nzbget: vhost
This commit is contained in:
parent
edf4ba07ee
commit
0698f9b8db
@ -2,35 +2,21 @@
|
||||
|
||||
let
|
||||
domain = "htnzb.giugl.io";
|
||||
auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block;
|
||||
|
||||
utilities = import ./utilities.nix { inherit lib config; };
|
||||
inherit (utilities) architectInterfaceAddress;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
nzbget = {
|
||||
enable = true;
|
||||
group = "media";
|
||||
};
|
||||
services.nzbget = {
|
||||
enable = true;
|
||||
group = "media";
|
||||
};
|
||||
|
||||
nginx.virtualHosts.${domain} = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:6789";
|
||||
extraConfig = auth_block {
|
||||
access_role = "nzbget";
|
||||
};
|
||||
};
|
||||
architect.vhost.${domain} = {
|
||||
dnsInterfaces = [ "tailscale" "wireguard" "lan" ];
|
||||
|
||||
locations."/" = {
|
||||
port = 6789;
|
||||
allowLan = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking.extraHosts = ''
|
||||
${architectInterfaceAddress "lan"} ${domain}
|
||||
${architectInterfaceAddress "wireguard"} ${domain}
|
||||
${architectInterfaceAddress "tailscale"} ${domain}
|
||||
'';
|
||||
|
||||
users.groups.media.members = [ "nzbget" ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user