nixos-servers/nixos.nix

25 lines
485 B
Nix
Raw Normal View History

2024-10-28 13:12:06 +00:00
{
self,
nixpkgs,
...
} @ inputs: let
deployArch = "x86_64-linux";
machines = self.machines.${deployArch};
2024-03-02 12:58:17 +00:00
mkNixosSystems = systemDef:
builtins.mapAttrs
2024-10-28 13:12:06 +00:00
(
name: machine:
2024-03-02 12:58:17 +00:00
nixpkgs.lib.nixosSystem (systemDef name machine)
2024-10-28 13:12:06 +00:00
)
machines;
in {
2024-03-02 12:58:17 +00:00
nixosConfigurations = mkNixosSystems (name: machine: {
2024-10-28 13:12:06 +00:00
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-10-28 13:12:06 +00:00
{networking.hostName = name;}
2024-03-02 12:58:17 +00:00
];
});
}