{ config, pkgs, ... }: { networking.firewall.allowedTCPPorts = [80 443 9001]; services.grafana = { enable = true; port = 2342; addr = "127.0.0.1"; domain = "grafana.heroin.trade"; }; services.prometheus = { enable = true; port = 9001; exporters = { node = { enable = true; enabledCollectors = ["systemd" "sysctl" "powersupplyclass"]; port = 9002; }; }; scrapeConfigs = [ { job_name = "beleth"; static_configs = [ { targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"]; } ]; } ]; }; }