From 2a249a3e684d96f57cf58402ffdecd424c114322 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 8 Dec 2024 16:39:31 +0100 Subject: fix(modules/ollama): Use workaround to get systemd to agree to impermanence --- modules/by-name/ol/ollama/module.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules/by-name/ol') diff --git a/modules/by-name/ol/ollama/module.nix b/modules/by-name/ol/ollama/module.nix index 418a1851..022770b0 100644 --- a/modules/by-name/ol/ollama/module.nix +++ b/modules/by-name/ol/ollama/module.nix @@ -11,7 +11,12 @@ in { config = lib.mkIf cfg.enable { soispha.impermanence.directories = [ - config.services.ollama.home + # Ollama's systemd services tries to do create the directory under + # `/var/lib/private/ollama` and then symlink `/var/lib/ollama` to that, when + # `DynamicUsers` is true. Thus we need to persist the private directory and not the + # resulting symlink one. + # Relevant issue: https://github.com/nix-community/impermanence/issues/93 + "/var/lib/private/ollama" ]; services.ollama = { -- cgit 1.4.1