nixos-servers/nixos.nix
2024-11-04 21:34:04 +01:00

24 lines
485 B
Nix

{
self,
nixpkgs,
...
} @ inputs: let
deployArch = "x86_64-linux";
machines = self.machines.${deployArch};
mkNixosSystems = systemDef:
builtins.mapAttrs
(
name: machine:
nixpkgs.lib.nixosSystem (systemDef name machine)
)
machines;
in {
nixosConfigurations = mkNixosSystems (name: machine: {
specialArgs = {inherit self inputs machine machines;};
modules = [
"${self}/modules"
{networking.hostName = name;}
];
});
}