nixos-servers/nixos.nix
2024-11-04 23:35:04 +01:00

26 lines
453 B
Nix

{
self,
nixpkgs,
...
} @ inputs: let
mkNixosSystems = systemDef:
builtins.mapAttrs
(
name: module:
nixpkgs.lib.nixosSystem (systemDef name module)
)
self.machines;
in {
nixosConfigurations = mkNixosSystems (name: module: {
specialArgs = {
inherit self inputs;
inherit (self) machines;
};
modules = [
"${self}/modules"
{networking.hostName = name;}
module
];
});
}