From 7116d4172c24e9d478dc7d41dd8a5deb243d0abb Mon Sep 17 00:00:00 2001 From: mc-fucker Date: Fri, 30 Jun 2023 09:16:15 +0200 Subject: [PATCH] init of prowlarr --- modules/arrstack.nix | 44 +++++++++++++++++++++++++++++++++++++++++--- modules/vars.nix | 3 +++ 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/modules/arrstack.nix b/modules/arrstack.nix index 4e2d77d..04de3e7 100644 --- a/modules/arrstack.nix +++ b/modules/arrstack.nix @@ -2,6 +2,7 @@ let cfg = import ./vars.nix; bazarr_port = cfg.arrstack.bazarr.port; + prowlarr_port = cfg.arrstack.prowlarr.port; radarr_port = cfg.arrstack.radarr.port; sonarr_port = cfg.arrstack.sonarr.port; sabnzbd_port = cfg.arrstack.sabnzbd.port; @@ -17,7 +18,7 @@ in TZ = "Europe/Berlin"; }; ports = [ - "${bazarr_port}:6767" + "${bazarr_port}:${bazarr_port}" ]; volumes = [ "/var/lib/bazarr:/config" @@ -28,13 +29,27 @@ in extraOptions = cfg.podman.extraOptions; }; + virtualisation.oci-containers.containers.prowlarr = { + image = "lscr.io/linuxserver/prowlarr:latest"; + environment = { + TZ = "Europe/Berlin"; + }; + ports = [ + "${prowlarr_port}:${prowlarr_port}" + ]; + volumes = [ + "/var/lib/prowlarr:/config" + ]; + extraOptions = cfg.podman.extraOptions; + }; + virtualisation.oci-containers.containers.radarr = { image = "lscr.io/linuxserver/radarr:latest"; environment = { TZ = "Europe/Berlin"; }; ports = [ - "${radarr_port}:7878" + "${radarr_port}:${radarr_port}" ]; volumes = [ "/var/lib/radarr:/config" @@ -50,7 +65,7 @@ in TZ = "Europe/Berlin"; }; ports = [ - "${sonarr_port}:8989" + "${sonarr_port}:${sonarr_port}" ]; volumes = [ "/var/lib/sonarr:/config" @@ -102,6 +117,29 @@ in }; }; + "prowlarr.${domain}" = { + forceSSL = true; + enableACME = true; + locations = { + "/" = { + proxyPass = "http://127.0.0.1:${outpost_port}"; + extraConfig = '' + #proxy_set_header Host $proxy_host; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $http_connection; + proxy_redirect off; + proxy_http_version 1.1; + access_log /var/log/nginx/prowlarr.${domain}_access.log; + error_log /var/log/nginx/prowlarr.${domain}_error.log; + ''; + }; + }; + }; + "radarr.${domain}" = { forceSSL = true; enableACME = true; diff --git a/modules/vars.nix b/modules/vars.nix index e11bdf6..5a4e4dc 100644 --- a/modules/vars.nix +++ b/modules/vars.nix @@ -4,6 +4,9 @@ bazarr = { port = "6767"; }; + prowlarr = { + port = "9696"; + }; radarr = { port = "7878"; };