Added Overlays

This commit is contained in:
2026-05-22 22:12:32 +02:00
parent 2a28574058
commit 42868908a6
7 changed files with 223 additions and 19 deletions
+32
View File
@@ -23,6 +23,9 @@ let
};
in
{
imports = [ ./gs-exporter.nix ];
sops.secrets = {
grafana_secret_key = {
owner = "grafana";
@@ -32,8 +35,14 @@ in
owner = "grafana";
group = "grafana";
};
zyxel_pass = {
group = "gs1200-exporter";
mode = "0440";
};
};
users.groups.gs1200-exporter = { };
services = {
grafana = {
enable = true;
@@ -141,9 +150,32 @@ in
}
];
}
{
job_name = "gs1200-zyxel1";
static_configs = [ { targets = [ "localhost:9934" ]; } ];
}
{
job_name = "gs1200-zyxel2";
static_configs = [ { targets = [ "localhost:9935" ]; } ];
}
]
++ (lib.mapAttrsToList mkNodeJob extraNodes);
};
gs1200-exporter.instances = {
zyxel1 = {
address = "192.168.2.3";
port = 9934;
passwordFile = config.sops.secrets.zyxel_pass.path;
group = "gs1200-exporter";
};
zyxel2 = {
address = "192.168.2.4";
port = 9935;
passwordFile = config.sops.secrets.zyxel_pass.path;
group = "gs1200-exporter";
};
};
};
networking.firewall.allowedTCPPorts = [