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;
|
||||
};
|
||||
|
||||
specialArgs = {
|
||||
inherit ulib;
|
||||
};
|
||||
in {
|
||||
nixosConfigurations.enka = lib.nixosSystem {
|
||||
inherit specialArgs;
|
||||
specialArgs = ulib;
|
||||
|
||||
modules = [
|
||||
homeManager.nixosModules.default
|
||||
(defaultConfiguration "enka")
|
||||
./machines/enka
|
||||
];
|
||||
};
|
||||
importConfigurations = hosts: builtins.concatMap (host: {
|
||||
${host} = lib.nixosSystem {
|
||||
inherit specialArgs;
|
||||
|
||||
modules = [
|
||||
homeManager.nixosModules.default
|
||||
(defaultConfiguration host)
|
||||
./machines/${host}
|
||||
];
|
||||
};
|
||||
}) hosts;
|
||||
in {
|
||||
nixosConfigurations = importConfigurations [
|
||||
"enka"
|
||||
];
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue