refactor: import nixosModules unconditionally, add enable options
This commit is contained in:
parent
c2d4ce78de
commit
850d673035
38 changed files with 959 additions and 761 deletions
|
|
@ -1,20 +1,25 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
services.prometheus.exporters = {
|
||||
node = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
port = 9190;
|
||||
enabledCollectors = [
|
||||
# keep-sorted start
|
||||
"cgroups"
|
||||
"interrupts"
|
||||
"softirqs"
|
||||
"swap"
|
||||
"systemd"
|
||||
"tcpstat"
|
||||
"wifi"
|
||||
# keep-sorted end
|
||||
];
|
||||
options.my.prometheusNode.enable = lib.mkEnableOption "Prometheus node exporter";
|
||||
|
||||
config = lib.mkIf config.my.prometheusNode.enable {
|
||||
services.prometheus.exporters = {
|
||||
node = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
port = 9190;
|
||||
enabledCollectors = [
|
||||
# keep-sorted start
|
||||
"cgroups"
|
||||
"interrupts"
|
||||
"softirqs"
|
||||
"swap"
|
||||
"systemd"
|
||||
"tcpstat"
|
||||
"wifi"
|
||||
# keep-sorted end
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue