nixos-servers/flake-parts/nixos.nix

29 lines
752 B
Nix

{ myLib, nixpkgs, nixpkgs-unstable, machines, dns, agenix, nixos-hardware, kubenix, disko, ... }:
let
mkNixosSystems = systemDef:
builtins.mapAttrs
(name: machine:
nixpkgs.lib.nixosSystem (systemDef name machine)
)
machines;
in
{
nixosConfigurations = mkNixosSystems (name: machine: {
system = machine.arch;
specialArgs = { inherit myLib nixpkgs-unstable machines machine dns agenix nixos-hardware kubenix disko; };
modules = [
../configuration.nix
{ networking.hostName = name; }
{
nixpkgs.overlays = [
(final: _prev: {
unstable = import nixpkgs-unstable {
system = machine.arch;
};
})
];
}
];
});
}