From cb2ed10279429d9d216f0e4c9ce29c032ad10b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 20 May 2026 23:39:13 +0200 Subject: [PATCH] nixos/immich: fix matplotlib warning in machine-learning machine-learning[1920443]: mkdir -p failed for path /var/empty/.config/matplotlib: [Errno 1] Operation not permitted: '/var/empty/.config' machine-learning[1920443]: Matplotlib created a temporary cache directory at /tmp/matplotlib-uo52wf71 because there was an issue with the default path (/var/empty/.config/matplotlib); it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing. --- nixos/modules/services/web-apps/immich.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/web-apps/immich.nix b/nixos/modules/services/web-apps/immich.nix index a45a4d5492cc..eaa0e3b0b403 100644 --- a/nixos/modules/services/web-apps/immich.nix +++ b/nixos/modules/services/web-apps/immich.nix @@ -380,6 +380,8 @@ in MACHINE_LEARNING_WORKERS = "1"; MACHINE_LEARNING_WORKER_TIMEOUT = "120"; MACHINE_LEARNING_CACHE_FOLDER = "/var/cache/immich"; + # TODO: drop when insightface no longer unconditionally imports matplotlib + MPLCONFIGDIR = "/var/cache/immich"; XDG_CACHE_HOME = "/var/cache/immich"; IMMICH_HOST = "localhost"; IMMICH_PORT = "3003";