diff options
Diffstat (limited to 'modules/piracy/radarr.nix')
-rw-r--r-- | modules/piracy/radarr.nix | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/piracy/radarr.nix b/modules/piracy/radarr.nix index 12f8d95..ee777d5 100644 --- a/modules/piracy/radarr.nix +++ b/modules/piracy/radarr.nix @@ -56,12 +56,27 @@ in apiKeyFile = config.secrets.radarr-api-key.path; inherit (config.services.radarr) user; inherit (config.services.radarr) group; - listenAddress = this.wireguard.ipv4.address; + listenAddress = "127.0.0.1"; environment.CONFIG = "/var/lib/radarr/.config/Radarr/config.xml"; }; }; + environment.etc."alloy/radarr.alloy".text = + with config.services.prometheus.exporters.exportarr-radarr; '' + prometheus.scrape "radarr" { + targets = [ + { + __address__ = "${listenAddress}:${toString port}", + instance = "${config.networking.hostName}", + } + ] + forward_to = [prometheus.relabel.default.receiver] + } + ''; + systemd = { + services.alloy.reloadTriggers = [ config.environment.etc."alloy/radarr.alloy".source ]; + tmpfiles.rules = with config.services.radarr; [ "d /var/lib/radarr/root 0755 ${user} ${group} - -" ]; |