-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
292 lines (244 loc) · 8.71 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
{
description = "My Home-Manager and NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Hardware modules
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# Hyprland-git
hyprland = {
type = "git";
url = "https://github.com/hyprwm/Hyprland";
submodules = true;
};
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
# Chaotic repo (cachyos kernel, mesa-git, ...)
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
# Aylur's GTK Shell
ags.url = "github:Aylur/ags";
# Unified Linux Wine Game Launcher
umu = {
url = "git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging\/nix&submodules=1";
inputs.nixpkgs.follows = "nixpkgs";
};
# Base16 system-wide colorscheming
stylix.url = "github:danth/stylix";
};
outputs = {
nixpkgs,
home-manager,
chaotic,
nixos-hardware,
stylix,
...
} @ inputs:
let
username = "alpha";
desktop = "eva01";
laptop = "eva02";
media-server = "media";
photos-server = "photos";
misc-server = "misc";
public-server = "public";
music-server = "music";
minecraft-server = "minecraft";
in
{
nixosConfigurations = {
# ~~ Desktop | Ryzen 5 5600X, Radeon 6700XT, 16GB RAM ~~
${desktop} = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
inherit username;
inherit desktop; # pass desktop hostname
};
system = "x86_64-linux";
modules = [
./system/core/default.nix # Core config
./system/desktop/common/default.nix # Desktop common config
./hosts/desktop/eva01/default.nix # Host specific system config
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./hosts/desktop/eva01/home.nix; # Host specific home config
home-manager.extraSpecialArgs = {
inherit inputs;
inherit username;
};
}
chaotic.nixosModules.default # Chaotic repo
stylix.nixosModules.stylix # Base16 colorscheming
];
};
# ~~ Laptop | Thinkpad E15 Gen 1, i5-10210U, 16GB RAM ~~
${laptop} = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
inherit username;
inherit laptop; # pass laptop hostname
};
system = "x86_64-linux";
modules = [
./system/core/default.nix # Core config
./system/desktop/common/default.nix # Desktop common config
./hosts/desktop/eva02/default.nix # Host specific system config
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./hosts/desktop/eva02/home.nix; # Host specific home config
home-manager.extraSpecialArgs = {
inherit inputs;
inherit username;
};
}
nixos-hardware.nixosModules.lenovo-thinkpad-e14-intel # Hardware module
stylix.nixosModules.stylix # Base16 colorscheming
];
};
# ~~ Server | Media streaming with Jellyfin ~~
${media-server} = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
inherit username;
inherit media-server;
};
system = "x86_64-linux";
modules = [
./system/core/default.nix # Core config
./system/server/common/default.nix # Server common config
./hosts/server/media/default.nix # Host specific system config
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./hosts/server/media/home.nix; # Host specific home config
home-manager.extraSpecialArgs = {
inherit inputs;
inherit username;
};
}
];
};
# ~~ Server | Photos library with Immich ~~
${photos-server} = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
inherit username;
inherit photos-server;
};
system = "x86_64-linux";
modules = [
./system/core/default.nix # Core config
./system/server/common/default.nix # Server common config
./hosts/server/photos/default.nix # Host specific system config
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./hosts/server/photos/home.nix; # Host specific home config
home-manager.extraSpecialArgs = {
inherit inputs;
inherit username;
};
}
];
};
# ~~ Server | Miscellaneous services (Homepage, Pi-Hole, etc.) ~~
${misc-server} = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
inherit username;
inherit misc-server;
};
system = "x86_64-linux";
modules = [
./system/core/default.nix # Core config
./system/server/common/default.nix # Server common config
./hosts/server/misc/default.nix # Host specific system config
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./hosts/server/misc/home.nix; # Host specific home config
home-manager.extraSpecialArgs = {
inherit inputs;
inherit username;
};
}
];
};
# ~~ Server | Public services (SearXNG, Piped, etc.) ~~
${public-server} = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
inherit username;
inherit public-server;
};
system = "x86_64-linux";
modules = [
./system/core/default.nix # Core config
./system/server/common/default.nix # Server common config
./hosts/server/public/default.nix # Host specific system config
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./hosts/server/public/home.nix; # Host specific home config
home-manager.extraSpecialArgs = {
inherit inputs;
inherit username;
};
}
];
};
# ~~ Server | Music streaming with Navidrome ~~
${music-server} = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
inherit username;
inherit music-server;
};
system = "x86_64-linux";
modules = [
./system/core/default.nix # Core config
./system/server/common/default.nix # Server common config
./hosts/server/music/default.nix # Host specific system config
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./hosts/server/music/home.nix; # Host specific home config
home-manager.extraSpecialArgs = {
inherit inputs;
inherit username;
};
}
];
};
# ~~ Server | Minecraft ~~
${minecraft-server} = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
inherit username;
inherit minecraft-server;
};
system = "x86_64-linux";
modules = [
./system/core/default.nix # Core config
./system/server/common/default.nix # Server common config
./hosts/server/minecraft/default.nix # Host specific system config
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./hosts/server/minecraft/home.nix; # Host specific home config
home-manager.extraSpecialArgs = {
inherit inputs;
inherit username;
};
}
];
};
};
};
}