diff --git a/photoprism.nix b/photoprism.nix index 31ea6bf..973aa28 100644 --- a/photoprism.nix +++ b/photoprism.nix @@ -1,9 +1,11 @@ { lib, modulesPath, pkgs, ... }: +let port = 2342; +in { services.photoprism = { enable = true; - port = 2342; + port = port; settings = { PHOTOPRISM_DEFAULT_LOCALE = "fr"; PHOTOPRISM_ADMIN_USERNAME = "admin"; @@ -43,13 +45,8 @@ forceSSL = true; serverAliases = []; locations."/" = { - proxyPass = "http://localhost:2342/"; + proxyPass = "http://localhost:${toString port}/"; proxyWebsockets = true; - extraConfig = '' - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $host; - proxy_buffering off; - ''; }; }; }