nixos-servers/flake-parts/nixos.nix

30 lines
752 B
Nix
Raw Normal View History

{ myLib, nixpkgs, nixpkgs-unstable, machines, dns, agenix, nixos-hardware, kubenix, disko, ... }:
2024-03-02 12:58:17 +00:00
let
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 myLib nixpkgs-unstable machines machine dns agenix nixos-hardware kubenix disko; };
2024-03-02 12:58:17 +00:00
modules = [
2024-04-13 14:06:35 +00:00
../configuration.nix
2024-03-02 12:58:17 +00:00
{ 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
];
});
}