diff --git a/hosts/architect/libreddit.nix b/hosts/architect/libreddit.nix index 71c841b..c8313d3 100644 --- a/hosts/architect/libreddit.nix +++ b/hosts/architect/libreddit.nix @@ -2,27 +2,15 @@ let domain = "reddit.giugl.io"; - - utilities = import ./utilities.nix { inherit lib config; }; - inherit (utilities) architectInterfaceAddress; in { - services = { - libreddit = { - enable = true; - port = 9090; - }; - - nginx.virtualHosts.${domain} = { - forceSSL = true; - enableACME = true; - locations."/" = { proxyPass = "http://127.0.0.1:${toString config.services.libreddit.port}"; }; - }; + services.libreddit = { + enable = true; + port = 9090; + }; + + architect.vhost.${domain} = { + dnsInterfaces = [ "lan" "tailscale" "wireguard" ]; + locations."/".port = config.services.libreddit.port; }; - - networking.extraHosts = '' - ${architectInterfaceAddress "lan"} ${domain} - ${architectInterfaceAddress "wireguard"} ${domain} - ${architectInterfaceAddress "tailscale"} ${domain} - ''; }