diff --git a/configuration.nix b/configuration.nix index 07a1713..c13c951 100644 --- a/configuration.nix +++ b/configuration.nix @@ -32,6 +32,8 @@ ./services/jellyfin-qbittorrent-monitor.nix ./services/bitmagnet.nix + ./services/arr/prowlarr.nix + ./services/soulseek.nix ./services/ups.nix diff --git a/flake.nix b/flake.nix index 5d84f04..4b55d0c 100644 --- a/flake.nix +++ b/flake.nix @@ -125,6 +125,7 @@ ntfy = 2586; livekit = 7880; lk_jwt = 8081; + prowlarr = 9696; }; https = { @@ -192,6 +193,10 @@ dataDir = services_dir + "/syncthing"; signalBackupDir = "/${zpool_ssds}/bak/signal"; grayjayBackupDir = "/${zpool_ssds}/bak/grayjay"; + + prowlarr = { + dataDir = services_dir + "/prowlarr"; + }; }; }; diff --git a/services/arr/prowlarr.nix b/services/arr/prowlarr.nix new file mode 100644 index 0000000..c5e9c69 --- /dev/null +++ b/services/arr/prowlarr.nix @@ -0,0 +1,26 @@ +{ + pkgs, + service_configs, + config, + lib, + ... +}: +{ + imports = [ + (lib.serviceMountWithZpool "prowlarr" service_configs.zpool_ssds [ + service_configs.prowlarr.dataDir + ]) + (lib.vpnNamespaceOpenPort service_configs.ports.prowlarr "prowlarr") + ]; + + services.prowlarr = { + enable = true; + dataDir = service_configs.prowlarr.dataDir; + settings.server.port = service_configs.ports.prowlarr; + }; + + services.caddy.virtualHosts."prowlarr.${service_configs.https.domain}".extraConfig = '' + import ${config.age.secrets.caddy_auth.path} + reverse_proxy ${config.vpnNamespaces.wg.namespaceAddress}:${builtins.toString service_configs.ports.prowlarr} + ''; +}