Move to vhost

This commit is contained in:
Giulio De Pasquale 2023-06-05 03:10:13 +02:00
parent b378975769
commit 2f43745162
3 changed files with 11 additions and 34 deletions

View File

@ -12,10 +12,10 @@ in
architect.vhost.${domain} = with config.architect.networks; {
dnsInterfaces = [ "lan" "wireguard" "tailscale" ];
locations."/" = {
allowLan = true;
port = 6767;
deny = [ lan.devices.router.address ];
allow = [
lan.net
wireguard.net
tailscale.net
];

View File

@ -2,41 +2,18 @@
let
domain = "htpro.giugl.io";
utilities = import ./utilities.nix { inherit lib config; };
inherit (utilities) architectInterfaceAddress;
in
{
services = {
prowlarr.enable = true;
services.prowlarr.enable = true;
architect.vhost.${domain} = {
dnsInterfaces = [ "tailscale" "wireguard" ];
nginx.virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:9696";
extraConfig = ''
allow ${config.architect.networks.lan.net};
allow ${config.architect.networks.tailscale.net};
deny all;
'';
};
# locations."/api" = {
# proxyPass = "http://127.0.0.1:9696/prowlarr/api";
# };
#
# locations."/Content" = {
# proxyPass = "http://127.0.0.1:9696/prowlarr/Content";
# };
port = 9696;
allowLan = true;
};
};
networking.extraHosts = ''
${architectInterfaceAddress "lan"} ${domain}
${architectInterfaceAddress "wireguard"} ${domain}
${architectInterfaceAddress "tailscale"} ${domain}
'';
users.groups.media.members = [ "prowlarr" ];
}

View File

@ -10,12 +10,12 @@ in
};
architect.vhost.${domain} = with config.architect.networks; {
dnsInterfaces = [ "lan" "wireguard" "tailscale" ];
dnsInterfaces = [ "wireguard" "tailscale" ];
locations."/" = {
port = 7878;
deny = [ lan.devices.router.address ];
allowLan = true;
allow = [
lan.net
wireguard.net
tailscale.net
];