nixos-servers/nixos.nix
2024-10-28 14:12:06 +01:00

26 lines
513 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: {
system = machine.arch;
specialArgs = {inherit self inputs machine machines;};
modules = [
"${self}/modules"
{networking.hostName = name;}
];
});
}