diff --git a/flake.nix b/flake.nix index 906311f..4f16beb 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ # flake for blakes nixos config # define new devices in outputs -# generation: 345 current 2025-10-12 11:39:59 25.05.20251006.20c4598 6.12.50 * +# generation: 346 current 2025-10-12 11:43:32 25.05.20251006.20c4598 6.12.50 * { description = "blakes nix config"; inputs = { diff --git a/modules/homelab/services/caddy/default.nix b/modules/homelab/services/caddy/default.nix index 5f16064..2ee7fb4 100644 --- a/modules/homelab/services/caddy/default.nix +++ b/modules/homelab/services/caddy/default.nix @@ -47,15 +47,13 @@ in email = "me@blakedheld.xyz"; globalConfig = '' auto_https ignore_loaded_certs + handle_errors { + @notFound { + expression {http.error.status_code} == 404 + } + redir @notFound https://www.youtube.com/watch?v=dQw4w9WgXcQ 302 + } ''; - virtualHosts = { - # catch all redirect - "catchall" = { - extraConfig = '' - @catchall not host * - redir @catchall https://www.youtube.com/watch?v=dQw4w9WgXcQ 302 - ''; - }; }; };