36 lines
786 B
Nix
36 lines
786 B
Nix
{
|
|
nixpkgs,
|
|
inputs,
|
|
outputs,
|
|
...
|
|
}:
|
|
{
|
|
mkSystem =
|
|
hostConfig:
|
|
nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = {
|
|
inherit inputs outputs hostConfig;
|
|
};
|
|
modules = [
|
|
inputs.impermanence.nixosModules.impermanence
|
|
# inputs.sops-nix.nixosModules.sops
|
|
|
|
./systems/base/configuration.nix
|
|
(
|
|
{ ... }:
|
|
{
|
|
networking.hostName = hostConfig.hostname;
|
|
system.stateVersion = hostConfig.stateVersion;
|
|
}
|
|
)
|
|
({ ... }: hostConfig.config)
|
|
] ++ builtins.map (role: role.nixosModule) hostConfig.roles;
|
|
};
|
|
|
|
mkRole = cfg: {
|
|
inherit (cfg) name description nixosModule;
|
|
traefikRoutes = cfg.traefikRoutes or ({ ... }: [ ]);
|
|
};
|
|
}
|