deluge: Add OpenID auth

This commit is contained in:
Giulio De Pasquale 2022-10-28 14:59:17 +02:00
parent 35dbc4f40e
commit 1be49e4835

View File

@ -3,6 +3,7 @@
let let
domain = "htdel.giugl.io"; domain = "htdel.giugl.io";
network = import ./network.nix; network = import ./network.nix;
auth_block = (import ./openid.nix).openresty_oidc_block;
in { in {
services = { services = {
deluge = { deluge = {
@ -34,11 +35,12 @@ in {
nginx.virtualHosts.${domain} = { nginx.virtualHosts.${domain} = {
locations."/" = { locations."/" = {
proxyPass = "http://localhost:8112"; proxyPass = "http://localhost:8112";
extraConfig = '' extraConfig = auth_block {
allow 10.0.0.0/24; realm = "master";
${lib.concatMapStrings (x: "allow ${x};") network.gdevices-wg} client_id = "deluge";
deny all; client_secret = "AGa1U9S1zkaM3TJVxtyx4Er76DBk1APR";
''; redirect_uri = "https://${domain}";
};
}; };
}; };
}; };