Simplify mkHosts
This commit is contained in:
parent
216026eb15
commit
0898c67a5a
1 changed files with 4 additions and 12 deletions
|
@ -5,20 +5,12 @@
|
||||||
modules,
|
modules,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
inputs,
|
inputs,
|
||||||
path ? (builtins.toString ../hosts),
|
}: builtins.listToAttrs (builtins.map (host: {
|
||||||
}: let
|
|
||||||
hosts = lib.getDirsInDir path;
|
|
||||||
common = {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = modules;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
builtins.listToAttrs (builtins.map (host: {
|
|
||||||
name = host;
|
name = host;
|
||||||
value = nixpkgs.lib.nixosSystem {
|
value = nixpkgs.lib.nixosSystem {
|
||||||
system = common.system;
|
system = "x86_64-linux";
|
||||||
modules = common.modules ++ [ ../hosts/${host} ];
|
modules = modules ++ [ ../hosts/${host} ];
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
};
|
};
|
||||||
}) hosts);
|
}) (lib.getDirsInDir ../hosts));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue