From fb06a36d6a5d93db747607dc66c8457777084050 Mon Sep 17 00:00:00 2001 From: Constantin Gierczak--Galle Date: Sun, 3 Nov 2024 17:10:07 +0100 Subject: [PATCH] fix: remove nginx flags and abstract over port --- photoprism.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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; - ''; }; }; }