lidarr, sonarr: Added OpenID auth

This commit is contained in:
Giulio De Pasquale 2022-10-28 14:48:46 +02:00
parent c9e46ec073
commit 7c3485f585
2 changed files with 14 additions and 11 deletions

View File

@ -3,6 +3,7 @@
let let
domain = "htlid.giugl.io"; domain = "htlid.giugl.io";
network = import ./network.nix; network = import ./network.nix;
auth_block = (import ./openid.nix).openresty_oidc_block;
in { in {
services = { services = {
lidarr = { lidarr = {
@ -15,12 +16,12 @@ in {
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
proxyPass = "http://localhost:8686"; proxyPass = "http://localhost:8686";
extraConfig = '' extraConfig = auth_block {
allow 10.0.0.0/24; realm = "master";
${lib.concatMapStrings (x: "allow ${x};") network.gdevices-wg} client_id = "lidarr";
deny all; client_secret = "7s4dd1SEi84F4fUFsqRaQmSSucZhyTco";
deny 10.0.0.1; redirect_uri = "https://${domain}";
''; };
}; };
}; };
}; };

View File

@ -3,6 +3,7 @@
let let
domain = "htson.giugl.io"; domain = "htson.giugl.io";
network = import ./network.nix; network = import ./network.nix;
auth_block = (import ./openid.nix).openresty_oidc_block;
in { in {
services = { services = {
sonarr = { sonarr = {
@ -15,11 +16,12 @@ in {
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
proxyPass = "http://localhost:8989"; proxyPass = "http://localhost:8989";
extraConfig = '' extraConfig = auth_block {
allow 10.0.0.0/24; realm = "master";
${lib.concatMapStrings (x: "allow ${x};") network.gdevices-wg} client_id = "sonarr";
deny all; client_secret = "d36ehMSPCI3xLfOGNcnSUKZWQblyGumi";
''; redirect_uri = "https://${domain}";
};
}; };
}; };
}; };