mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 19:47:47 +00:00
Make a helper function to import configurations
This commit is contained in:
parent
73ee4b2873
commit
0b4a718c78
1 changed files with 16 additions and 12 deletions
28
flake.nix
28
flake.nix
|
@ -109,18 +109,22 @@
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
specialArgs = {
|
specialArgs = ulib;
|
||||||
inherit ulib;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
nixosConfigurations.enka = lib.nixosSystem {
|
|
||||||
inherit specialArgs;
|
|
||||||
|
|
||||||
modules = [
|
importConfigurations = hosts: builtins.concatMap (host: {
|
||||||
homeManager.nixosModules.default
|
${host} = lib.nixosSystem {
|
||||||
(defaultConfiguration "enka")
|
inherit specialArgs;
|
||||||
./machines/enka
|
|
||||||
];
|
modules = [
|
||||||
};
|
homeManager.nixosModules.default
|
||||||
|
(defaultConfiguration host)
|
||||||
|
./machines/${host}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}) hosts;
|
||||||
|
in {
|
||||||
|
nixosConfigurations = importConfigurations [
|
||||||
|
"enka"
|
||||||
|
];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue