diff options
author | sefidel <contact@sefidel.net> | 2023-02-02 02:37:57 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2023-02-02 02:37:57 +0900 |
commit | 1267d795c02071e34d87d6f970967f23ddbfdb2e (patch) | |
tree | 5ba1af34c23f899f134adf8744bf6905b5d6bc98 /lib | |
parent | cdac3299f36bba6cf4d47b50bd32b3cebc6af156 (diff) | |
download | nixrc-1267d795c02071e34d87d6f970967f23ddbfdb2e.tar.gz nixrc-1267d795c02071e34d87d6f970967f23ddbfdb2e.zip |
feat(colmena/cobalt): init
Diffstat (limited to 'lib')
-rw-r--r-- | lib/default.nix | 1 | ||||
-rw-r--r-- | lib/mk_colmena.nix | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix index 704a15e..13164a9 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -4,6 +4,7 @@ inputs: mkSystem = import ./mk_system.nix inputs; mkHome = import ./mk_home.nix inputs; mkDarwin = import ./mk_darwin.nix inputs; + mkColmena = import ./mk_colmena.nix inputs; nixosConfigurationsAsPackages = import ./nixos_configurations_as_packages.nix inputs; homeConfigurationsAsPackages = import ./home_configurations_as_packages.nix inputs; } 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 + ]; +} |