Update modules/server/containers/apps/immich.nix

This commit is contained in:
2026-06-03 17:16:18 +02:00
parent d0b6718254
commit ddc5c76a35

View File

@@ -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