1
Fork 0
nixos-system-config/lib/hosts.nix
2024-07-25 21:32:55 +02:00

16 lines
347 B
Nix

{ lib }:
{
mkHosts = {
modules,
nixpkgs,
inputs,
}: builtins.listToAttrs (builtins.map (host: {
name = host;
value = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = modules ++ [ ../hosts/${host} ];
specialArgs = { inherit inputs; };
};
}) (lib.getDirsInDir ../hosts));
}