fix: remove nginx flags and abstract over port

This commit is contained in:
Constantin Gierczak--Galle 2024-11-03 17:10:07 +01:00
parent 02eacb37e5
commit fb06a36d6a
No known key found for this signature in database

View file

@ -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;
'';
};
};
}