Enable prometheus node exporter by default #19

Merged
nerf merged 5 commits from Gonne/nixConfig:prometheusNodeExporter into main 2023-11-06 14:30:33 +00:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 2c2b24d0a9 - Show all commits

View file

@ -56,5 +56,5 @@ services = {
PasswordAuthentication = false; PasswordAuthentication = false;
}; };
}; };
}; };
Gonne marked this conversation as resolved Outdated
Outdated
Review

This is the closing bracket of the services record, there should be less white space, right?

This is the closing bracket of the services record, there should be less white space, right?
} }

View file

@ -1,3 +1,4 @@
{config, ...}:
Gonne marked this conversation as resolved Outdated
Outdated
Review

At least there should be persistence for
/var/lib/${config.services.prometheus.stateDir}
(maybe the config name is slightly wrong better look it up.)

At least there should be persistence for `/var/lib/${config.services.prometheus.stateDir}` (maybe the config name is slightly wrong better look it up.)
{ {
imports = [ ]; imports = [ ];
services.prometheus.exporters.node = { services.prometheus.exporters.node = {
@ -33,4 +34,5 @@
]; ];
}; };
networking.firewall.allowedTCPPorts = [ 9100 ]; networking.firewall.allowedTCPPorts = [ 9100 ];
environment.persistence.${config.impermanence.name}.directories = [ "/var/lib/${config.services.prometheus.stateDir}" ];
} }