{ config, lib, ... }: let inherit (lib) mkOption types; cfg = config.my.services.node-exporter; in { options.my.services.node-exporter = { listenAddress = mkOption { type = types.str; default = "[::1]"; description = "Address to listen on."; }; }; config = { services.prometheus.exporters.node = { enable = true; inherit (cfg) listenAddress; enabledCollectors = [ "systemd" ]; # disable a whole bunch of useless/unneeded collectors disabledCollectors = [ "arp" "bcache" "bonding" "fibrechannel" "infiniband" "ipvs" "selinux" "tapestats" "xfs" ]; }; }; }