-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
154 lines (148 loc) · 4.06 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
{
description = "Personal NixOS Configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/041c867bad68dfe34b78b2813028a2e2ea70a23c";
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
nixneovim.url = "github:nixneovim/nixneovim";
agenix.url = "github:ryantm/agenix";
nixos-wsl = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-anywhere = {
url = "github:numtide/nixos-anywhere";
inputs.nixpkgs.follows = "nixpkgs";
inputs.disko.follows = "disko";
};
};
outputs = inputs @ {
self,
nixpkgs,
home-manager,
nix-darwin,
agenix,
nixneovim,
nixos-wsl,
...
}: let
user = "edean";
hostname = "MBP-von-Dean";
forAllSystems = function:
nixpkgs.lib.genAttrs ["aarch64-darwin" "x86_64-darwin" "aarch64-linux" "x86_64-linux"] (system:
function {
inherit system;
pkgs = nixpkgs.legacyPackages.${system};
});
in {
darwinConfigurations = (
import ./hosts/darwin {
inherit (nixpkgs) lib;
inherit inputs nixpkgs home-manager user hostname nix-darwin agenix;
}
);
nixosConfigurations.wsl = (
import ./hosts/wsl/default.nix {
inherit (nixpkgs) lib;
inherit inputs nixpkgs home-manager agenix nixos-wsl;
}
);
nixosConfigurations.karotte = (
import ./hosts/karotte/default.nix {
inherit (nixpkgs) lib;
inherit inputs nixpkgs home-manager agenix;
}
);
homeConfigurations."karotte" = let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}.extend inputs.nixneovim.overlays.default;
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
./hosts/karotte/home.nix
./modules/home-manager/direnv.nix
./modules/home-manager/git.nix
./modules/home-manager/nixneovim.nix
./modules/home-manager/zsh/zsh.nix
./modules/home-manager/wezterm/wezterm.nix
];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = {
inherit system;
user = "dean";
nixneovim = inputs.nixneovim;
};
};
nixosConfigurations."NixUTM" = let
system = "aarch64-linux";
in
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs system;
user = "dean";
hostname = "NixUTM";
};
modules = [
./hosts/nix-utm
home-manager.nixosModules.home-manager
];
};
nixosConfigurations."NiXPS" = let
system = "x86_64-linux";
in
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs system;
user = "dean";
hostname = "NiXPS";
};
modules = [
./hosts/nixps
home-manager.nixosModules.home-manager
];
};
nixosConfigurations."VirtualNix" = let
system = "x86_64-linux";
in
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs system;
user = "dean";
hostname = "VirtualNix";
};
modules = [
./hosts/virtual-nix
home-manager.nixosModules.home-manager
];
};
nixosConfigurations."NixHyperVM" = let
system = "x86_64-linux";
in
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs system;
user = "dean";
hostname = "NixHyperVM";
};
modules = [
./hosts/nix-hyper-vm
home-manager.nixosModules.home-manager
];
};
formatter = forAllSystems ({pkgs, ...}: pkgs.alejandra);
};
}