voidconf/modules/prometheus.nix
2024-01-03 03:06:58 +01:00

20 lines
401 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 = {
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" "cpu" ];
port = 9002;
};
};
};
};
}