36 lines
778 B
Nix
36 lines
778 B
Nix
{ lib, ... }:
|
|
|
|
let
|
|
domain = "htbaz.giugl.io";
|
|
network = import ./network.nix;
|
|
auth_block = (import ./openid.nix).openresty_oidc_block;
|
|
in {
|
|
services = {
|
|
bazarr = {
|
|
enable = true;
|
|
group = "media";
|
|
};
|
|
|
|
nginx.virtualHosts.${domain} = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations."/" = {
|
|
proxyPass = "http://localhost:6767";
|
|
extraConfig = auth_block {
|
|
realm = "master";
|
|
client_id = "bazarr";
|
|
client_secret = "OPn4Mmto2m3dDPji1cjPfHy9W55M9JFq";
|
|
redirect_uri = "https://${domain}";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
networking.extraHosts = ''
|
|
${network.architect-lan} ${domain}
|
|
${network.architect-wg} ${domain}
|
|
'';
|
|
|
|
users.groups.media.members = [ "bazarr" ];
|
|
}
|