bazarr: use vhost
This commit is contained in:
parent
da1b08c44a
commit
17d2e10345
@ -2,35 +2,25 @@
|
||||
|
||||
let
|
||||
domain = "htbaz.giugl.io";
|
||||
auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block;
|
||||
|
||||
utilities = import ./utilities.nix { inherit lib config; };
|
||||
inherit (utilities) architectInterfaceAddress;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
bazarr = {
|
||||
enable = true;
|
||||
group = "media";
|
||||
};
|
||||
services.bazarr = {
|
||||
enable = true;
|
||||
group = "media";
|
||||
};
|
||||
|
||||
nginx.virtualHosts.${domain} = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:6767";
|
||||
extraConfig = auth_block {
|
||||
access_role = "bazarr";
|
||||
};
|
||||
};
|
||||
architect.vhost.${domain} = with config.architect.networks; {
|
||||
dnsInterfaces = [ "lan" "wireguard" "tailscale" ];
|
||||
locations."/" = {
|
||||
port = 6767;
|
||||
deny = [ lan.devices.router.address ];
|
||||
allow = [
|
||||
lan.net
|
||||
wireguard.net
|
||||
tailscale.net
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
networking.extraHosts = ''
|
||||
${architectInterfaceAddress "lan"} ${domain}
|
||||
${architectInterfaceAddress "wireguard"} ${domain}
|
||||
${architectInterfaceAddress "tailscale"} ${domain}
|
||||
'';
|
||||
|
||||
users.groups.media.members = [ "bazarr" ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user