diff options
Diffstat (limited to 'modules/piracy/prowlarr.nix')
-rw-r--r-- | modules/piracy/prowlarr.nix | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/piracy/prowlarr.nix b/modules/piracy/prowlarr.nix index ebcba7f..c1c34cc 100644 --- a/modules/piracy/prowlarr.nix +++ b/modules/piracy/prowlarr.nix @@ -44,7 +44,7 @@ in url = "http://127.0.0.1"; port = port + 10000; apiKeyFile = config.secrets.lidarr-api-key.path; - listenAddress = this.wireguard.ipv4.address; + listenAddress = "127.0.0.1"; environment = { PROWLARR__BACKFILL = "true"; PROWLARR__BACKFILL_DATE_SINCE = "2025-01-01"; @@ -52,6 +52,21 @@ in }; }; + environment.etc."alloy/prowlarr.alloy".text = + with config.services.prometheus.exporters.exportarr-prowlarr; '' + prometheus.scrape "prowlarr" { + targets = [ + { + __address__ = "${listenAddress}:${toString port}", + instance = "${config.networking.hostName}", + } + ] + forward_to = [prometheus.relabel.default.receiver] + } + ''; + + systemd.services.alloy.reloadTriggers = [ config.environment.etc."alloy/prowlarr.alloy".source ]; + topology.nodes.${this.hostname}.services.prowlarr = { name = "Prowlarr"; icon = "${inputs.homelab-svg-assets}/assets/prowlarr.svg"; |