21 lines
422 B
Nix
21 lines
422 B
Nix
|
{ lib, config, ... }:
|
||
|
with lib;
|
||
|
let cfg = config.voidcruiser.prometheus;
|
||
|
in {
|
||
|
options.voidcruiser.prometheus = {
|
||
|
enable = mkEnableOption "Enable prometheus node";
|
||
|
};
|
||
|
config = mkIf cfg.enable {
|
||
|
services.prometheus = {
|
||
|
enable = true;
|
||
|
exporters = {
|
||
|
node = {
|
||
|
enable = true;
|
||
|
enabledCollectors = [ "systemd" "cpu" ];
|
||
|
port = 9002;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|