{ config, pkgs, ... }: { services.prometheus = { enable = true; port = 7001; exporters = { node = { enable = true; enabledCollectors = [ "systemd" ]; port = 7002; }; }; scrapeConfigs = [ { job_name = "eve-psr-nix0"; static_configs = [{ targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ]; }]; } { job_name = "eve-psr-mc0"; static_configs = [{ targets = [ "192.168.0.131:7002" ]; }]; } ]; }; }