nix-managed-macbook/flake.nix

106 lines
2.8 KiB
Nix
Raw Normal View History

{
2024-01-31 16:00:03 +05:30
description = "Nix Darwin + Home Manager configuration of Abhinav Sarkar";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
2024-10-18 17:41:54 +05:30
nixpkgs-stable.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
2023-11-25 16:13:20 +05:30
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-14 12:15:52 +05:30
nix-vscode-extensions = {
url = "github:nix-community/nix-vscode-extensions";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-compat.follows = "flake-compat";
flake-utils.follows = "flake-utils";
};
};
nixd = {
url = "github:nix-community/nixd/2.5.1";
2024-09-14 12:15:52 +05:30
inputs.nixpkgs.follows = "nixpkgs";
};
2024-07-12 07:46:14 +05:30
lix-module = {
flake.lock: Update Flake lock file updates: • Updated input 'home-manager': 'github:nix-community/home-manager/8f6ca7855d409aeebe2a582c6fd6b6a8d0bf5661' (2024-11-03) → 'github:nix-community/home-manager/60bb110917844d354f3c18e05450606a435d2d10' (2024-11-10) • Updated input 'lix-module': 'https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/622a2253a071a1fb97a4d3c8103a91114acc1140.tar.gz?narHash=sha256-zNW/rqNJwhq2lYmQf19wJerRuNimjhxHKmzrWWFJYts%3D&rev=622a2253a071a1fb97a4d3c8103a91114acc1140' (2024-08-13) → 'https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/6478f624b2a00367e0e3d750a2c7a9f3afb72712.tar.gz?narHash=sha256-slp0zWHKvbCzhiBwwe6VX6jODEY%2BPKhHyiAoHgM5Bdc%3D&rev=6478f624b2a00367e0e3d750a2c7a9f3afb72712' (2024-10-19) • Updated input 'lix-module/lix': 'https://git.lix.systems/api/v1/repos/lix-project/lix/archive/bcaeb6388b8916ac6d1736e3aa2b13313e6a6bd2.tar.gz?narHash=sha256-Rosl9iA9MybF5Bud4BTAQ9adbY81aGmPfV8dDBGl34s%3D&rev=bcaeb6388b8916ac6d1736e3aa2b13313e6a6bd2' (2024-08-12) → 'https://git.lix.systems/api/v1/repos/lix-project/lix/archive/ad9d06f7838a25beec425ff406fe68721fef73be.tar.gz?narHash=sha256-hiGtfzxFkDc9TSYsb96Whg0vnqBVV7CUxyscZNhed0U%3D&rev=ad9d06f7838a25beec425ff406fe68721fef73be' (2024-10-19) • Updated input 'nix-darwin': 'github:LnL7/nix-darwin/4652874d014b82cb746173ffc64f6a70044daa7e' (2024-11-03) → 'github:LnL7/nix-darwin/5c74ab862c8070cbf6400128a1b56abb213656da' (2024-11-09) • Updated input 'nix-vscode-extensions': 'github:nix-community/nix-vscode-extensions/16ca007ec37c29a8b97e4899f33c013defbdb2f9' (2024-11-04) → 'github:nix-community/nix-vscode-extensions/85caf0185a4bf8fc2161c33a6d6d328052d7da44' (2024-11-10) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/2d2a9ddbe3f2c00747398f3dc9b05f7f2ebb0f53' (2024-10-30) → 'github:nixos/nixpkgs/85f7e662eda4fa3a995556527c87b2524b691933' (2024-11-07) • Updated input 'nixpkgs-stable': 'github:nixos/nixpkgs/9706f4dd0e516de529fbd15bb8337e4a10d53307' (2024-10-31) → 'github:nixos/nixpkgs/c128e44a249d6180740d0a979b6480d5b795c013' (2024-11-06)
2024-11-10 19:49:22 +05:30
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1.tar.gz";
2024-07-12 07:46:14 +05:30
inputs.nixpkgs.follows = "nixpkgs";
2024-09-14 12:15:52 +05:30
inputs.flake-utils.follows = "flake-utils";
2024-07-12 07:46:14 +05:30
};
2024-09-14 12:15:52 +05:30
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
dm-mono-font = {
url = "github:googlefonts/dm-mono";
flake = false;
};
2023-11-25 12:48:21 +05:30
monaspace-font = {
2024-09-14 12:15:52 +05:30
url = "github:githubnext/monaspace";
2023-11-25 12:48:21 +05:30
flake = false;
};
};
2024-10-22 18:53:09 +05:30
outputs =
inputs@{
self,
nixpkgs,
nixpkgs-stable,
nix-darwin,
home-manager,
lix-module,
...
}:
let
system = "x86_64-darwin";
pkgs = import nixpkgs {
inherit system;
2024-10-22 18:53:09 +05:30
config = {
allowUnfree = true;
};
};
2024-10-18 17:41:54 +05:30
pkgs-stable = import nixpkgs-stable {
inherit system;
2024-10-22 18:53:09 +05:30
config = {
allowUnfree = true;
};
2024-10-18 17:41:54 +05:30
};
2024-10-22 18:53:09 +05:30
in
{
2023-11-25 16:13:20 +05:30
darwinConfigurations."Abhinavs-MacBook-Pro" = nix-darwin.lib.darwinSystem {
inherit system;
2024-10-22 18:53:09 +05:30
specialArgs = {
inherit inputs pkgs-stable;
};
2023-11-25 16:13:20 +05:30
modules = [
./configuration.nix
2024-01-31 16:00:03 +05:30
./homebrew.nix
2024-07-12 07:46:14 +05:30
lix-module.nixosModules.default
2023-11-25 16:13:20 +05:30
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
2024-05-02 19:05:26 +05:30
home-manager.backupFileExtension = "backup";
2023-11-25 16:13:20 +05:30
home-manager.users.abhinav = import ./home.nix;
2024-10-22 18:53:09 +05:30
home-manager.extraSpecialArgs = {
inherit inputs pkgs-stable;
nixd = inputs.nixd.packages.${system}.nixd;
2024-10-22 18:53:09 +05:30
};
2023-11-25 16:13:20 +05:30
}
];
};
devShells.${system}.default = pkgs.mkShell {
2024-10-22 18:53:09 +05:30
buildInputs = with pkgs; [
(import home-manager { inherit pkgs; }).home-manager
just
];
shellHook = ''
2023-11-25 16:13:20 +05:30
export NIXPKGS_PATH=${pkgs.path};
'';
};
};
}