From cb8a982852a966cb852494f07205c2067398a83f Mon Sep 17 00:00:00 2001 From: noe Date: Sat, 22 Jun 2024 19:06:43 -0400 Subject: [PATCH] static-sites: update --- nixos/hosts/static-sites/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nixos/hosts/static-sites/default.nix b/nixos/hosts/static-sites/default.nix index ce10dde..d2292c9 100644 --- a/nixos/hosts/static-sites/default.nix +++ b/nixos/hosts/static-sites/default.nix @@ -42,7 +42,15 @@ in rec { }; } // defaultConfig; in rec { - "noe.sh" = static { src = flakePackage "noe-sh"; aliases = [ "mekanoe.com" ]; }; + "noe.sh" = static { src = flakePackage "noe-sh"; aliases = [ "mekanoe.com" ]; } // { + locations."=/" = { + extraConfig = '' + if ($http_user_agent ~ curl/) { + rewrite ^ /noe.sh; + } + ''; + }; + }; # "3d.noe.sh" = static { src = flakePackage "3d-noe-sh"; aliases = [ "art.mekanoe.com" ]; }; "doll.repair" = static { src = flakePackage "doll-repair"; };