1
Fork 0

Simplify mkHosts

This commit is contained in:
caem 2024-07-25 21:32:55 +02:00
parent 216026eb15
commit 0898c67a5a
Signed by: caem
GPG key ID: 69A830D03203405F

View file

@ -5,20 +5,12 @@
modules,
nixpkgs,
inputs,
path ? (builtins.toString ../hosts),
}: let
hosts = lib.getDirsInDir path;
common = {
system = "x86_64-linux";
modules = modules;
};
in
builtins.listToAttrs (builtins.map (host: {
}: builtins.listToAttrs (builtins.map (host: {
name = host;
value = nixpkgs.lib.nixosSystem {
system = common.system;
modules = common.modules ++ [ ../hosts/${host} ];
system = "x86_64-linux";
modules = modules ++ [ ../hosts/${host} ];
specialArgs = { inherit inputs; };
};
}) hosts);
}) (lib.getDirsInDir ../hosts));
}