diff --git a/hosts/lilac/default.nix b/hosts/lilac/default.nix index 94333ea..fefbbab 100644 --- a/hosts/lilac/default.nix +++ b/hosts/lilac/default.nix @@ -83,14 +83,18 @@ in enable = true; package = unstable.ollama-vulkan; - # Environment tweaks to manage Vulkan layers and memory boundaries environmentVariables = { + # Ensure the Vulkan loader can locate the Intel ICD driver json file + VK_ICD_FILENAMES = "${pkgs.intel-compute-runtime}/share/vulkan/icd.d/intel_icd.x86_64.json"; + # Forces Ollama to strictly leverage Vulkan device routing GGML_VULKAN_DEVICE = "0"; + + # Prevents multi-model concurrency thrashing on unified memory + OLLAMA_NUM_PARALLEL = "1"; - # Hints the runner to allocate maximum context buffers in unified memory - # Adjust this if your desktop environment + apps feel constrained, but with 64GB you're safe. - OLLAMA_NUM_PARALLEL = "1"; + # Optional: Set flash attention or high context limits if desired + OLLAMA_FLASH_ATTENTION = "1"; }; }; } diff --git a/system/packages.nix b/system/packages.nix index 84c732d..df318c1 100644 --- a/system/packages.nix +++ b/system/packages.nix @@ -49,7 +49,7 @@ in networkmanagerapplet nitrogen nix-direnv - unstable.ollama + unstable.ollama-vulkan osv-scanner pasystray pkg-config