From 6018b615cc036a065b71f41f831662f4ef1cfb31 Mon Sep 17 00:00:00 2001
From: Julien Malka <julien@malka.sh>
Date: Sat, 30 Mar 2024 12:09:03 +0100
Subject: [PATCH] update core data

---
 machines/core-data/default.nix | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/machines/core-data/default.nix b/machines/core-data/default.nix
index 5cb90d5..f1ee580 100644
--- a/machines/core-data/default.nix
+++ b/machines/core-data/default.nix
@@ -75,12 +75,15 @@
 
   services.tailscale.enable = true;
 
+  services.openssh.settings.PermitRootLogin = "yes";
+  services.openssh.settings.PasswordAuthentication = lib.mkForce true;
 
   # Photoprism
   services.photoprism = {
     enable = true;
     port = 2342;
     originalsPath = "/data/photos";
+    passwordFile = "/srv/photoprism";
     importPath = "import";
     address = "0.0.0.0";
     settings = {
@@ -97,7 +100,6 @@
 
   services.mysql = {
     enable = true;
-    dataDir = "/data/mysql";
     package = pkgs.mariadb;
     ensureDatabases = [ "photoprism" ];
     ensureUsers = [{
@@ -119,15 +121,10 @@
       "photos.malka.family" = {
         forceSSL = true;
         enableACME = true;
+        http2 = true;
         locations."/" = {
-          proxyPass = "http://127.0.0.1:2342";
+          proxyPass = "http://0.0.0.0:2342";
           proxyWebsockets = true;
-          extraConfig = ''
-            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-            proxy_set_header Host $host;
-            proxy_buffering off;
-            proxy_http_version 1.1;
-          '';
         };
       };
     };