nixos-config/modules/nixos/prometheus/ntfy-sh.nix

16 lines
356 B
Nix
Raw Normal View History

{ config, lib, ... }:
let
cfg = config.custom.prometheus;
in
{
config = lib.mkIf (cfg.enable && cfg.exporters.ntfy-sh.enable) {
services.ntfy-sh.settings.enable-metrics = true;
services.prometheus.scrapeConfigs = [
{
job_name = "ntfy-sh";
2024-08-25 09:45:58 +00:00
static_configs = [ { targets = [ "ntfy.xinyang.life" ]; } ];
}
];
};
}