1
Fork 0
nixos-system-config/lib/hosts.nix
2025-01-23 01:42:41 +01:00

24 lines
488 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;
inherit lib;
username = user;
};
};
}) (lib.getDirsInDir ../hosts));
}