From 97b35f64203727331dc095664934070eef9e827d Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Thu, 5 Feb 2026 20:22:55 +0100 Subject: [PATCH] nixos/llama-cpp: add state and cache directory This is required to allow automatic download from huggingface etc. They are placed in LLAMA_CACHE which is now the cache directory. --- nixos/modules/services/misc/llama-cpp.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/services/misc/llama-cpp.nix b/nixos/modules/services/misc/llama-cpp.nix index 65ed2880b0b2..df9538d5137c 100644 --- a/nixos/modules/services/misc/llama-cpp.nix +++ b/nixos/modules/services/misc/llama-cpp.nix @@ -77,6 +77,10 @@ in serviceConfig = { Type = "idle"; KillSignal = "SIGINT"; + StateDirectory = "llama-cpp"; + CacheDirectory = "llama-cpp"; + WorkingDirectory = "/var/lib/llama-cpp"; + Environment = [ "LLAMA_CACHE=/var/cache/llama-cpp" ]; ExecStart = let args = [