diff options
author | azahi <azat@bahawi.net> | 2025-03-12 20:17:13 +0300 |
---|---|---|
committer | azahi <azat@bahawi.net> | 2025-03-12 20:17:13 +0300 |
commit | c81dc5a13b469c511fac6fa2390b70422d1b4da5 (patch) | |
tree | 4dab5909006ab5c25da6bd9fde6a714c7719ded7 /modules/piracy/prowlarr.nix | |
parent | 2025-02-17 (diff) |
Diffstat (limited to '')
-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"; |