1
Fork 0
nixos-system-config/lib/hosts.nix

25 lines
488 B
Nix
Raw Normal View History

{ lib }:
{
mkHosts = {
nixpkgs,
inputs,
2025-01-08 02:06:46 +01:00
modules,
2025-01-11 02:00:28 +01:00
user,
2024-07-25 21:32:55 +02:00
}: builtins.listToAttrs (builtins.map (host: {
name = host;
value = nixpkgs.lib.nixosSystem {
2024-07-25 21:32:55 +02:00
system = "x86_64-linux";
2025-01-11 02:00:28 +01:00
modules = modules ++ [
../hosts/${host}
../modules/nixos/user/${user}.nix
];
specialArgs = {
inherit inputs;
inherit lib;
2025-01-23 01:42:41 +01:00
username = user;
2025-01-11 02:00:28 +01:00
};
};
2024-07-25 21:32:55 +02:00
}) (lib.getDirsInDir ../hosts));
}