From 7c772395de64db96469ea6ca42dc917b8f668b54 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 24 Jul 2024 22:46:46 +0200 Subject: [PATCH] add trick to selectively enable autoindex --- configuration.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index 2f23023..b68e69c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -393,7 +393,11 @@ # User static files locations."/~rnhmjoj/" = { alias = "/run/nginx/static/rnhmjoj/"; - extraConfig = "charset UTF-8;"; + extraConfig = '' + charset UTF-8; + # directories with listing + location ~ /~rnhmjoj/[^/]+.index/ { autoindex on; } + ''; }; locations."/~giu/" = { alias = "/run/nginx/static/giu/";