From 9c86422497752c88c7cffde9d2eff458e8cc066e Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 17 Jan 2025 19:10:26 +0000 Subject: [PATCH] fix photoprism config file path issue --- flake.nix | 2 +- hosts/common/optional/arion-containers/photoprism.nix | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 95c3d75..f16b7e3 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "Nix Config"; + description = "Nixos Config"; inputs = { # Nixpkgs diff --git a/hosts/common/optional/arion-containers/photoprism.nix b/hosts/common/optional/arion-containers/photoprism.nix index 55dae6c..dbe5e17 100644 --- a/hosts/common/optional/arion-containers/photoprism.nix +++ b/hosts/common/optional/arion-containers/photoprism.nix @@ -1,8 +1,7 @@ -{ +{config, ...}: { sops.secrets = { "software/photoprism" = { - path = "/run/secrets/photoprism/config.yaml"; - mode = "0600"; + path = "/etc/photoprism/options.yml"; }; }; virtualisation.arion = { @@ -11,7 +10,7 @@ settings = { services.photoprism.service = { ports = [ - "8096:8096" + "2342:2342" ]; container_name = "photoprism"; image = "photoprism/photoprism:latest"; @@ -21,10 +20,10 @@ "/media/photos/sam/originals:/photoprism/originals" "/media/photos/sam/imports:/photoprism/import" "/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 = { - PHOTOPRISM_CONFIG_PATH = "/etc/photoprism/config.yaml"; + PHOTOPRISM_CONFIG_PATH = "/etc/photoprism"; PHOTOPRISM_INIT = "intel"; PHOTOPRISM_ORIGINALS_LIMIT = 5000; PHOTOPRISM_HTTP_COMPRESSION = "gzip";