1
0

Define host groups

This commit is contained in:
2023-04-21 23:03:11 +02:00
parent dcd8c37014
commit 7d13fb29d1
2 changed files with 17 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ rec {
generateNixosSystem = {
name,
system ? "x86_64-linux",
group ? null,
}: let
localNixpkgs = nixpkgs.lib.attrByPath [ "nixpkgs-${name}" ] nixpkgs inputs;
in localNixpkgs.lib.nixosSystem {
@@ -25,6 +26,7 @@ rec {
nixos-exporter;
})
];
clerie.monitoring = nixpkgs.lib.attrsets.optionalAttrs (group != null) { serviceLevel = group; };
})
solid-xmpp-alarm.nixosModules.solid-xmpp-alarm
(../hosts + "/${name}/configuration.nix")
@@ -37,6 +39,9 @@ rec {
deployment = {
targetHost = "${name}.net.clerie.de";
targetUser = null;
tags = let
group = nixpkgs.lib.attrByPath [ "clerie" "monitoring" "serviceLevel" ] null hostSystem.config;
in nixpkgs.lib.lists.optional (group != null) group;
};
nixpkgs.system = hostSystem.config.nixpkgs.system;
imports = hostSystem._module.args.modules;