1
Fork 0
nixos-system-config/lib/hosts.nix
2025-01-23 15:52:18 +01:00

24 lines
495 B
Nix

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