1
Fork 0
nixos-system-config/lib/hosts.nix
2025-01-08 02:06:46 +01:00

16 lines
347 B
Nix

{ lib }:
{
mkHosts = {
nixpkgs,
inputs,
modules,
}: 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));
}