fix: get the attributes merging correctly

This commit is contained in:
silver 2024-05-23 21:48:23 +01:00
parent 963a189bcb
commit 147bd86ad5
Signed by: silver
GPG key ID: 54E2C71918E93B74

View file

@ -43,7 +43,7 @@ in {
}; };
}; };
config = config = mkMerge [
{ {
services.prometheus.exporters.node = { services.prometheus.exporters.node = {
enable = true; enable = true;
@ -52,7 +52,7 @@ in {
port = cfg.port_collecter; port = cfg.port_collecter;
}; };
} }
// mkIf cfg.server.enable { (mkIf cfg.server.enable {
services.prometheus = { services.prometheus = {
enable = true; enable = true;
port = cfg.server.port; port = cfg.server.port;
@ -67,5 +67,6 @@ in {
} }
]; ];
}; };
}; })
];
} }