diff options
Diffstat (limited to 'lib/mk_colmena.nix')
-rw-r--r-- | lib/mk_colmena.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/mk_colmena.nix b/lib/mk_colmena.nix new file mode 100644 index 0000000..c4b5bad --- /dev/null +++ b/lib/mk_colmena.nix @@ -0,0 +1,34 @@ +{ self, ... } @ args: + +{ name +, system ? "x86_64-linux" +, deployment ? null +, host ? null +, port ? 22 +, tags ? null +, extraModules ? null +, ... +}: +let + configFolder = "${self}/colmena"; + entryPoint = "${configFolder}/${name}/configuration.nix"; + hardware = "${configFolder}/${name}/hardware-configuration.nix"; +in +{ + deployment = deployment; + # system = system; + + imports = [ + { + _module.args = args; + networking.hostName = name; + nix.flakes.enable = true; + system.configurationRevision = self.rev or "dirty"; + documentation.man = { enable = true; generateCaches = true; }; + } + entryPoint + hardware + ../nixos/modules/flake.nix + ../nixos/modules/nix.nix + ]; +} |