nixos-servers/nix/flake/nixos.nix

30 lines
766 B
Nix
Raw Normal View History

2024-03-19 21:56:52 +00:00
{ nixpkgs, nixpkgs-unstable, machines, physicalMachines, dns, microvm, disko, agenix, nixos-hardware, kubenix, ... }:
2024-03-02 12:58:17 +00:00
let
mkNixosSystems = systemDef:
builtins.mapAttrs
(name: machine:
nixpkgs.lib.nixosSystem (systemDef name machine)
)
physicalMachines;
in
{
nixosConfigurations = mkNixosSystems (name: machine: {
system = machine.arch;
2024-03-19 21:56:52 +00:00
specialArgs = { inherit nixpkgs-unstable machines machine dns microvm disko agenix nixos-hardware kubenix; };
2024-03-02 12:58:17 +00:00
modules = [
../.
{ networking.hostName = name; }
2024-03-05 19:56:00 +00:00
{
nixpkgs.overlays = [
(final: _prev: {
unstable = import nixpkgs-unstable {
system = machine.arch;
};
})
];
}
2024-03-02 12:58:17 +00:00
];
});
}