nzbget: Add OpenID auth

This commit is contained in:
Giulio De Pasquale 2022-10-28 14:56:40 +02:00
parent 4975e3434f
commit 35dbc4f40e

View File

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