bugfix for lib.getHosts

This commit is contained in:
Sean Buckley 2021-10-28 16:24:50 -04:00
parent acf460ec7a
commit c8014ded7d

View file

@ -6,7 +6,7 @@ let
# grab a list of systems, with associated hostnames # grab a list of systems, with associated hostnames
# { x86_64-linux = [ "host1" "host2" ]; } # { x86_64-linux = [ "host1" "host2" ]; }
sysToHosts = mapAttrs sysToHosts = mapAttrs
(system: _: attrNames (readDir "${path}/${system}")) (system: _: attrNames (readDir (path + "/${system}")))
(readDir path); (readDir path);
# invert the attrset, from {sys=[name]} to {name=sys} # invert the attrset, from {sys=[name]} to {name=sys}
@ -24,7 +24,7 @@ let
inherit system; inherit system;
modules = [ modules = [
(nixosModule) (nixosModule)
("${path}/${system}/${hostName}") (path + "/${system}/${hostName}")
(_: { networking.hostName = hostName; }) (_: { networking.hostName = hostName; })
]; ];
}) })