diff --git a/hosts/hub/default.nix b/hosts/hub/default.nix index 693c548..204be3a 100644 --- a/hosts/hub/default.nix +++ b/hosts/hub/default.nix @@ -126,8 +126,25 @@ 443 ]; - services.caddy.virtualHosts."thewordnerd.info".extraConfig = - ''redir https://www.thewordnerd.info{uri}''; + services.caddy.virtualHosts."thewordnerd.info".extraConfig = '' + @webfinger { + path /.well-known/webfinger + # query acct=nolan%3Athewordnerd%40info + } + handle @webfinger { + rewrite * /.well-known/webfinger?resource=acct%3Anolan%40gts.thewordnerd.info + reverse_proxy localhost:8081 + } + handle /.well-known/nodeinfo { + reverse_proxy localhost:8081 + } + handle /.well-known/host-meta { + reverse_proxy localhost:8081 + } + handle { + redir https://www.thewordnerd.info{uri} + } + ''; services.caddy.virtualHosts."www.thewordnerd.info".extraConfig = '' file_server