fix photoprism config file path issue

This commit is contained in:
Sam 2025-01-17 19:10:26 +00:00
parent f087d7d933
commit 9c86422497
2 changed files with 6 additions and 7 deletions

View File

@ -1,5 +1,5 @@
{ {
description = "Nix Config"; description = "Nixos Config";
inputs = { inputs = {
# Nixpkgs # Nixpkgs

View File

@ -1,8 +1,7 @@
{ {config, ...}: {
sops.secrets = { sops.secrets = {
"software/photoprism" = { "software/photoprism" = {
path = "/run/secrets/photoprism/config.yaml"; path = "/etc/photoprism/options.yml";
mode = "0600";
}; };
}; };
virtualisation.arion = { virtualisation.arion = {
@ -11,7 +10,7 @@
settings = { settings = {
services.photoprism.service = { services.photoprism.service = {
ports = [ ports = [
"8096:8096" "2342:2342"
]; ];
container_name = "photoprism"; container_name = "photoprism";
image = "photoprism/photoprism:latest"; image = "photoprism/photoprism:latest";
@ -21,10 +20,10 @@
"/media/photos/sam/originals:/photoprism/originals" "/media/photos/sam/originals:/photoprism/originals"
"/media/photos/sam/imports:/photoprism/import" "/media/photos/sam/imports:/photoprism/import"
"/srv/docker/photoprism/storage:/photoprism/storage" "/srv/docker/photoprism/storage:/photoprism/storage"
"/run/secrets/photoprism/config.yaml:/etc/photoprism/config.yaml" "${config.sops.secrets."software/photoprism".path}:/etc/photoprism/options.yml"
]; ];
environment = { environment = {
PHOTOPRISM_CONFIG_PATH = "/etc/photoprism/config.yaml"; PHOTOPRISM_CONFIG_PATH = "/etc/photoprism";
PHOTOPRISM_INIT = "intel"; PHOTOPRISM_INIT = "intel";
PHOTOPRISM_ORIGINALS_LIMIT = 5000; PHOTOPRISM_ORIGINALS_LIMIT = 5000;
PHOTOPRISM_HTTP_COMPRESSION = "gzip"; PHOTOPRISM_HTTP_COMPRESSION = "gzip";