{ lib, config, pkgs, ... }: with lib; let psCfg = config.pub-solar; cfg = config.pub-solar.monitoring-client; in { options.pub-solar.monitoring-client = { enable = mkEnableOption "Install a monitoring client node"; listenAddress = mkOption { type = types.str; }; }; config = mkIf cfg.enable { services.prometheus.exporters = { node = { enable = true; enabledCollectors = ["systemd"]; port = 9002; openFirewall = true; listenAddress = cfg.listenAddress; }; wireguard = { enable = true; openFirewall = true; listenAddress = cfg.listenAddress; }; }; }; }