{ config, lib, ... }: let cfg = config.bagel.monitoring.exporters.baseline; inherit (lib) mkEnableOption mkIf; in { options.bagel.monitoring.exporters.baseline.enable = (mkEnableOption "Standard set of exporters") // { default = true; }; config = mkIf cfg.enable { services.prometheus.exporters.node = { enable = true; enabledCollectors = [ "processes" "systemd" ]; port = 9101; }; services.cadvisor = { enable = true; port = 9102; listenAddress = "0.0.0.0"; }; bagel.meta.monitoring.exporters = [ { port = 9101; } { port = 9102; } ]; }; }