From bf117df5312c732b8d4fc139460efa1785b76b32 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Fri, 11 Nov 2022 19:08:57 +0100 Subject: [PATCH] bazarr, lidarr, deluge, sonarr, radarr: Switch to nginx client for openid --- hosts/architect/bazarr.nix | 12 +++++------- hosts/architect/deluge.nix | 11 ++++------- hosts/architect/lidarr.nix | 9 +++------ hosts/architect/radarr.nix | 9 +++------ hosts/architect/sonarr.nix | 9 +++------ 5 files changed, 18 insertions(+), 32 deletions(-) diff --git a/hosts/architect/bazarr.nix b/hosts/architect/bazarr.nix index 706ef3b..c6429a0 100644 --- a/hosts/architect/bazarr.nix +++ b/hosts/architect/bazarr.nix @@ -3,8 +3,9 @@ let domain = "htbaz.giugl.io"; network = import ./network.nix; - auth_block = (import ./openid.nix).openresty_oidc_block; -in { + auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block; +in +{ services = { bazarr = { enable = true; @@ -15,12 +16,9 @@ in { forceSSL = true; enableACME = true; locations."/" = { - proxyPass = "http://localhost:6767"; + proxyPass = "http://127.0.0.1:6767"; extraConfig = auth_block { - realm = "master"; - client_id = "bazarr"; - client_secret = "OPn4Mmto2m3dDPji1cjPfHy9W55M9JFq"; - redirect_uri = "https://${domain}"; + access_role = "bazarr"; }; }; }; diff --git a/hosts/architect/deluge.nix b/hosts/architect/deluge.nix index a3ef01d..ee5dbfa 100644 --- a/hosts/architect/deluge.nix +++ b/hosts/architect/deluge.nix @@ -3,7 +3,7 @@ let domain = "htdel.giugl.io"; network = import ./network.nix; - auth_block = (import ./openid.nix).openresty_oidc_block; + auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block; in { services = { deluge = { @@ -22,7 +22,7 @@ in { max_active_seeding = 100; max_connections_global = 1000; max_active_limit = 100; - max_active_downloading = 100; + max_active_downloading = 100; listen_ports = [ 51413 51414 ]; random_port = false; enabled_plugins = [ "Label" "Extractor" ]; @@ -37,12 +37,9 @@ in { enableACME = true; locations."/" = { - proxyPass = "http://localhost:8112"; + proxyPass = "http://127.0.0.1:8112"; extraConfig = auth_block { - realm = "master"; - client_id = "deluge"; - client_secret = "AGa1U9S1zkaM3TJVxtyx4Er76DBk1APR"; - redirect_uri = "https://${domain}"; + access_role = "deluge"; }; }; }; diff --git a/hosts/architect/lidarr.nix b/hosts/architect/lidarr.nix index c07fed5..028ab63 100644 --- a/hosts/architect/lidarr.nix +++ b/hosts/architect/lidarr.nix @@ -3,7 +3,7 @@ let domain = "htlid.giugl.io"; network = import ./network.nix; - auth_block = (import ./openid.nix).openresty_oidc_block; + auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block; in { services = { lidarr = { @@ -15,12 +15,9 @@ in { forceSSL = true; enableACME = true; locations."/" = { - proxyPass = "http://localhost:8686"; + proxyPass = "http://127.0.0.1:8686"; extraConfig = auth_block { - realm = "master"; - client_id = "lidarr"; - client_secret = "7s4dd1SEi84F4fUFsqRaQmSSucZhyTco"; - redirect_uri = "https://${domain}"; + access_role = "lidarr"; }; }; }; diff --git a/hosts/architect/radarr.nix b/hosts/architect/radarr.nix index f0dda97..dd3f51e 100644 --- a/hosts/architect/radarr.nix +++ b/hosts/architect/radarr.nix @@ -3,7 +3,7 @@ let domain = "htrad.giugl.io"; network = import ./network.nix; - auth_block = (import ./openid.nix).openresty_oidc_block; + auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block; in { services = { radarr = { @@ -15,12 +15,9 @@ in { forceSSL = true; enableACME = true; locations."/" = { - proxyPass = "http://localhost:7878"; + proxyPass = "http://127.0.0.1:7878"; extraConfig = auth_block { - realm = "master"; - client_id = "radarr"; - client_secret = "DCoeN4PwqGrAoG6Mqw73orrUjojJ1fmn"; - redirect_uri = "https://${domain}"; + access_role = "radarr"; }; }; }; diff --git a/hosts/architect/sonarr.nix b/hosts/architect/sonarr.nix index 5bccd50..d8ae0d2 100644 --- a/hosts/architect/sonarr.nix +++ b/hosts/architect/sonarr.nix @@ -3,7 +3,7 @@ let domain = "htson.giugl.io"; network = import ./network.nix; - auth_block = (import ./openid.nix).openresty_oidc_block; + auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block; in { services = { sonarr = { @@ -15,12 +15,9 @@ in { forceSSL = true; enableACME = true; locations."/" = { - proxyPass = "http://localhost:8989"; + proxyPass = "http://127.0.0.1:8989"; extraConfig = auth_block { - realm = "master"; - client_id = "sonarr"; - client_secret = "d36ehMSPCI3xLfOGNcnSUKZWQblyGumi"; - redirect_uri = "https://${domain}"; + access_role = "sonarr"; }; }; };