From cda94f0850afce8f2bc10526f4117314e1879079 Mon Sep 17 00:00:00 2001 From: Satria Date: Sun, 1 Mar 2026 10:29:10 +0700 Subject: [PATCH] add 404 host --- modules/system/homelab/proxy.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/system/homelab/proxy.nix b/modules/system/homelab/proxy.nix index 078570a..195f241 100644 --- a/modules/system/homelab/proxy.nix +++ b/modules/system/homelab/proxy.nix @@ -22,7 +22,12 @@ in { enable = true; recommendedProxySettings = true; recommendedTlsSettings = true; - virtualHosts = lib.mapAttrs' (subdomain: cfg: lib.nameValuePair "${subdomain}.${base}" { + virtualHosts = { + "_" = { + default = true; + locations."/".return = "404"; + }; + } // lib.mapAttrs' (subdomain: cfg: lib.nameValuePair (if subdomain == "@" then base else "${subdomain}.${base}") { useACMEHost = base; forceSSL = true;