diff --git a/modules/nixos/services/homeserver/caddy.nix b/modules/nixos/services/homeserver/caddy.nix index 9ee2c5d..d0565be 100755 --- a/modules/nixos/services/homeserver/caddy.nix +++ b/modules/nixos/services/homeserver/caddy.nix @@ -29,11 +29,9 @@ enableReload = false; extraConfig = '' - (cloudflare-tls) { - tls ${config.sops.secrets."caddy/wo2wz.fyi.crt".path} ${config.sops.secrets."caddy/wo2wz.fyi.key".path} - } - (default-settings) { + import httpcat-errors + encode header { @@ -45,6 +43,26 @@ -X-Powered-By } } + + (cloudflare-tls) { + tls ${config.sops.secrets."caddy/wo2wz.fyi.crt".path} ${config.sops.secrets."caddy/wo2wz.fyi.key".path} + } + + (httpcat-errors) { + handle_errors { + header Content-Type text/html + respond < + + {err.status_code} {err.status_text} + + {err.status_code} {err.status_text} +

shit

error id: {err.id}

+ + + HTML + } + } ''; # have to specify node tags here because if there are two tailscale blocks it just dont work globalConfig = ''