-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
105 lines (103 loc) · 2.78 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
description = "Nix Darwin + Home Manager configuration of Abhinav Sarkar";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
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";
inputs.nixpkgs.follows = "nixpkgs";
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
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;
};
monaspace-font = {
url = "github:githubnext/monaspace";
flake = false;
};
};
outputs =
inputs@{
self,
nixpkgs,
nixpkgs-stable,
nix-darwin,
home-manager,
lix-module,
...
}:
let
system = "x86_64-darwin";
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
};
pkgs-stable = import nixpkgs-stable {
inherit system;
config = {
allowUnfree = true;
};
};
in
{
darwinConfigurations."Abhinavs-MacBook-Pro" = nix-darwin.lib.darwinSystem {
inherit system;
specialArgs = {
inherit inputs pkgs-stable;
};
modules = [
./configuration.nix
./homebrew.nix
lix-module.nixosModules.default
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.users.abhinav = import ./home.nix;
home-manager.extraSpecialArgs = {
inherit inputs pkgs-stable;
nixd = inputs.nixd.packages.${system}.nixd;
};
}
];
};
devShells.${system}.default = pkgs.mkShell {
buildInputs = with pkgs; [
(import home-manager { inherit pkgs; }).home-manager
just
];
shellHook = ''
export NIXPKGS_PATH=${pkgs.path};
'';
};
};
}