voidconf/modules/prometheus.nix

20 lines
401 B
Nix
Raw Normal View History

2023-12-30 16:34:24 +01:00
{ 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;
};
};
};
};
}