From ab8a579a9ce9fb563153f6feb2b54f87fe907dde Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Thu, 15 May 2025 21:32:19 +0200 Subject: [PATCH] :heavy_minus_sign: [shared] Only use cuda acceleration for Ollama if Nvidia is used --- shared/modules/development/ollama.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/modules/development/ollama.nix b/shared/modules/development/ollama.nix index d737250..11a8ce2 100644 --- a/shared/modules/development/ollama.nix +++ b/shared/modules/development/ollama.nix @@ -1,6 +1,8 @@ +{ lib, systemConfig, ... }: + { services.ollama = { enable = true; - acceleration = "cuda"; + acceleration = lib.mkIf systemConfig.nvidia.enable "cuda"; }; }