From ddc5c76a352082875cf81365c7dba902536cc59d Mon Sep 17 00:00:00 2001 From: sora-ext Date: Wed, 3 Jun 2026 17:16:18 +0200 Subject: [PATCH] Update modules/server/containers/apps/immich.nix --- modules/server/containers/apps/immich.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/server/containers/apps/immich.nix b/modules/server/containers/apps/immich.nix index 4be43a7..7c1a7ba 100644 --- a/modules/server/containers/apps/immich.nix +++ b/modules/server/containers/apps/immich.nix @@ -8,10 +8,12 @@ in { db = true; paths = [{ - path = "${serverCfg.configPath}/immich/cache"; + path = "${serverCfg.path.config}/immich"; + dirs = ["cache"]; mode = "0750"; }{ - path = "${serverCfg.dataPath}/immich/"; + path = "${serverCfg.path.data}/immich/"; + dirs = ["upload" "thumbs" "encoded-video" "backups"]; mode = "0755"; }]; @@ -33,7 +35,10 @@ in { }; overrides = { volumes = [ - "${serverCfg.dataPath}/immich:/data" + "${serverCfg.path.photo}:/data/upload" + "${serverCfg.path.data}/immich/backups:/data/backups" + "${serverCfg.path.config}/immich/thumbs:/data/thumbs" + "${serverCfg.path.config}/immich/encoded-video:/data/encoded-video" ]; }; }; @@ -43,7 +48,7 @@ in { port = 3003; overrides = { volumes = [ - "${serverCfg.configPath}/immich/cache:/cache" + "${serverCfg.path.config}/immich/cache:/cache" ]; }; }; @@ -57,8 +62,6 @@ in { $PSQL -d "immich_db" -tAc "CREATE EXTENSION IF NOT EXISTS vchord CASCADE;" $PSQL -d "immich_db" -tAc "CREATE EXTENSION IF NOT EXISTS earthdistance CASCADE;" - mkdir -p ${serverCfg.dataPath}/immich/{upload,library,thumbs,encoded-video,profile,backups} - IMMICH_URL="https://${containerCfg.subdomain}.${serverCfg.domain}" until [[ "$(${pkgs.curl}/bin/curl -s -o /dev/null -w "%{http_code}" "$IMMICH_URL")" =~ (200|301|302) ]]; do sleep 5