From 4a7b3229a85068a24a418934480d1979fa34b8d7 Mon Sep 17 00:00:00 2001
From: Julien Moutinho <julm+julm-nix@sourcephile.fr>
Date: Sun, 26 Feb 2023 04:08:38 +0100
Subject: [PATCH] aubergine: nginx: fix /perso

---
 hosts/aubergine/nginx/aubergine.nix | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/hosts/aubergine/nginx/aubergine.nix b/hosts/aubergine/nginx/aubergine.nix
index 386cf84..35f7983 100644
--- a/hosts/aubergine/nginx/aubergine.nix
+++ b/hosts/aubergine/nginx/aubergine.nix
@@ -26,7 +26,18 @@ in
         #autoindex on;
         return 444;
       '';
-      locations."/perso" = {
+      locations."/perso/photo" = {
+        #basicAuthFile = gnupg.secrets."nginx/perso/htpasswd".path;
+        extraConfig = ''
+          autoindex on;
+          fancyindex on;
+          fancyindex_exact_size off;
+          fancyindex_name_length 255;
+          open_file_cache off;
+          #open_file_cache_valid 1s;
+        '';
+      };
+      locations."/perso/camera" = {
         #basicAuthFile = gnupg.secrets."nginx/perso/htpasswd".path;
         extraConfig = ''
           autoindex on;
@@ -45,7 +56,8 @@ in
         "nginx/${domain}/${hostName}"
       ];
       BindReadOnlyPaths = [
-        "-/mnt/off2/julm/backup/das1/julm/perso:${root}/perso"
+        "-/mnt/off2/julm/backup/das1/julm/perso/photo:${root}/perso/photo"
+        "-/mnt/off2/julm/perso/camera:${root}/perso/camera"
       ];
     };
   };
-- 
2.47.2