nixos-servers/nixos.nix

24 lines
508 B
Nix
Raw Normal View History

{ self, nixpkgs, ... }@inputs:
2024-03-02 12:58:17 +00:00
let
deployArch = "x86_64-linux";
machines = self.machines.${deployArch};
2024-03-02 12:58:17 +00:00
mkNixosSystems = systemDef:
builtins.mapAttrs
(name: machine:
nixpkgs.lib.nixosSystem (systemDef name machine)
)
2024-04-13 13:43:01 +00:00
machines;
2024-03-02 12:58:17 +00:00
in
{
nixosConfigurations = mkNixosSystems (name: machine: {
system = machine.arch;
specialArgs = { inherit self inputs machine machines; };
2024-06-13 17:46:21 +00:00
2024-03-02 12:58:17 +00:00
modules = [
2024-09-07 11:59:04 +00:00
"${self}/modules"
2024-03-02 12:58:17 +00:00
{ networking.hostName = name; }
];
});
}