diff --git a/hosts/architect/deluge.nix b/hosts/architect/deluge.nix index 98522f8..8f2fcd3 100644 --- a/hosts/architect/deluge.nix +++ b/hosts/architect/deluge.nix @@ -2,11 +2,6 @@ let domain = "htdel.giugl.io"; - auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block; - - utilities = import ./utilities.nix { inherit lib config; }; - inherit (utilities) architectInterfaceAddress; - listenPorts = [ 51413 51414 ]; in { @@ -41,25 +36,22 @@ in authFile = "/secrets/deluge/auth"; extraPackages = [ pkgs.unrar ]; }; + }; - nginx.virtualHosts.${domain} = { - forceSSL = true; - enableACME = true; + architect.vhost.${domain} = with config.architect.networks; { + dnsInterfaces = [ "lan" "wireguard" "tailscale" ]; + locations = { + "/" = { + allowLan = true; + port = 8112; - locations."/" = { - proxyPass = "http://127.0.0.1:8112"; - extraConfig = auth_block { - access_role = "deluge"; - }; + allow = [ + wireguard.net + tailscale.net + ]; }; }; }; - networking.extraHosts = '' - ${architectInterfaceAddress "lan"} ${domain} - ${architectInterfaceAddress "wireguard"} ${domain} - ${architectInterfaceAddress "tailscale"} ${domain} - ''; - users.groups.media.members = [ "deluge" ]; }