os/hosts/cox/photoprism.nix
Hendrik Sokolowski 6c7d9704bd
All checks were successful
continuous-integration/drone/push Build is passing
latest changes
2023-11-11 01:24:25 +01:00

38 lines
924 B
Nix

{ lib, ... }:
{
systemd.services.photoprism = {
unitConfig.RequiresMountsFor = [ "/opt/media/photoprism" ];
serviceConfig = {
DynamicUser = lib.mkForce false;
User = "photoprism";
Group = "photoprism";
};
};
services.nginx.virtualHosts."cox.lan".locations."/photoprism" = {
proxyPass = "http://127.0.0.1:18899";
proxyWebsockets = true;
};
users.users.photoprism = {
group = "photoprism";
isSystemUser = true;
};
users.groups.photoprism = {};
services.photoprism = {
enable = true;
originalsPath = "/opt/media/photoprism/originals";
storagePath = "/opt/media/photoprism/data";
importPath = "/opt/media/photoprism/import";
port = 18899;
address = "127.0.0.1";
settings = {
PHOTOPRISM_DEFAULT_LOCALE = "de";
PHOTOPRISM_SITE_URL = "http://cox.lan/photoprism";
PHOTOPRISM_TRUSTED_PROXY = "127.0.0.1/8";
};
};
}