nixos/immich: set $XDG_CACHE_HOME

The immich-machine-learning service can fail with

    RuntimeError: Data processing error: I/O error: Operation not permitted (os error 1)

because huggingface attempts to download files to $HOME/.cache (which
doesn't exist in this case) unless $XDG_CACHE_HOME or $HF_HOME is set.
This commit is contained in:
Robert Schütz
2025-09-19 05:35:12 -07:00
parent 73dfe087ee
commit 3fbb8e08a1
@@ -360,6 +360,7 @@ in
MACHINE_LEARNING_WORKERS = "1";
MACHINE_LEARNING_WORKER_TIMEOUT = "120";
MACHINE_LEARNING_CACHE_FOLDER = "/var/cache/immich";
XDG_CACHE_HOME = "/var/cache/immich";
IMMICH_HOST = "localhost";
IMMICH_PORT = "3003";
};