voidconf/modules/prometheus.nix

20 lines
395 B
Nix
Raw Permalink Normal View History

2023-12-30 16:34:24 +01:00
{ lib, config, ... }:
with lib;
2024-02-17 18:49:37 +01:00
let cfg = config.voidconf.prometheus;
2023-12-30 16:34:24 +01:00
in {
2024-02-17 18:49:37 +01:00
options.voidconf.prometheus = {
2023-12-30 16:34:24 +01:00
enable = mkEnableOption "Enable prometheus node";
};
config = mkIf cfg.enable {
services.prometheus = {
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" "cpu" ];
port = 9002;
};
};
};
};
}