nixos-servers/flake-parts/nixos.nix
2024-06-13 19:46:21 +02:00

21 lines
468 B
Nix

{ self, myLib, nixpkgs, machines, ... }@inputs:
let
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 myLib machine machines; };
modules = [
"${self}/configuration.nix"
{ networking.hostName = name; }
];
});
}