-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
52 lines (48 loc) · 1.38 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
{
inputs = {
stable.url = "git+file:stable"; #"nixpkgs/nixos-22.05";
unstable.url = "git+file:unstable"; #"nixpkgs/nixos-unstable-small";
};
outputs = { self, stable, unstable }: {
nixosConfigurations =
let
mkSystemConfigs = system: m:
let
name = baseNameOf m;
conf = { inherit system; modules = [ m ]; };
in
{
"${name}-stable" = stable.lib.nixosSystem conf;
"${name}-unstable" = unstable.lib.nixosSystem conf;
};
x64 = m: mkSystemConfigs "x86_64-linux" m;
lib = unstable.lib;
machines = lib.fold lib.mergeAttrs { } [
(x64 machines/tobati)
(x64 machines/ita)
(x64 ./machines/m0)
(x64 ./machines/m1)
(x64 ./machines/m2)
(x64 ./machines/m4)
(x64 ./machines/m5)
(x64 ./machines/m6)
(x64 ./machines/m7)
];
# systemArgs = {
# tobati = x64 ./machines/tobati;
# };
# machines = nixpkgs: {
# tobati = nixpkgs.lib.nixosSystem { system = x64; modules = [ ./machines/tobati ]; };
# };
# in
# machines unstable;
in
machines // (with machines; {
tobati = tobati-unstable;
ita = ita-stable;
m0 = m0-stable;
m1 = m1-stable;
m2 = m2-stable;
});
};
}