diff --git a/hosts/architect/lidarr.nix b/hosts/architect/lidarr.nix index 7dcd4ef..eabdb27 100644 --- a/hosts/architect/lidarr.nix +++ b/hosts/architect/lidarr.nix @@ -1,11 +1,7 @@ -{ config, lib, ... }: +{ config, ... }: let domain = "htlid.giugl.io"; - auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block; - - utilities = import ./utilities.nix { inherit lib config; }; - inherit (utilities) architectInterfaceAddress; in { services = { @@ -13,23 +9,17 @@ in enable = true; group = "media"; }; + }; - nginx.virtualHosts.${domain} = { - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://127.0.0.1:8686"; - extraConfig = auth_block { - access_role = "lidarr"; - }; - }; + architect.vhost.${domain} = { + dnsInterfaces = [ "lan" "tailscale" ]; + locations."/" = { + port = 8686; + allowLan = true; + allowWAN = false; + allow = [ config.architect.networks."tailscale".net ]; }; }; - networking.extraHosts = '' - ${architectInterfaceAddress "lan"} ${domain} - ${architectInterfaceAddress "tailscale"} ${domain} - ''; - users.groups.media.members = [ "lidarr" ]; }