From b86a92293c971f2f2dd2e08f062b3f9b2a66b646 Mon Sep 17 00:00:00 2001 From: ediblerope Date: Wed, 13 May 2026 09:23:23 +0100 Subject: [PATCH] ollama: build against CUDA 12.2 for Quadro M2000 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The M2000's legacy_535 driver caps CUDA support at 12.2; nixpkgs' default ollama-cuda targets 12.8 (requires driver ≥570), causing the runner to crash immediately. Override to CUDA 12.2 with sm_52 arch target to match Maxwell GM206 compute capability. Also open port 11434 on the mediaserver firewall for remote ollama access from other LAN hosts. Co-Authored-By: Claude Sonnet 4.6 --- hosts/FredOS-Mediaserver.nix | 2 +- services/ollama.nix | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hosts/FredOS-Mediaserver.nix b/hosts/FredOS-Mediaserver.nix index 82e6f75..ed2cba0 100644 --- a/hosts/FredOS-Mediaserver.nix +++ b/hosts/FredOS-Mediaserver.nix @@ -34,7 +34,7 @@ networking.useDHCP = lib.mkDefault true; # Open firewall for SSH - networking.firewall.allowedTCPPorts = [ 22 ]; + networking.firewall.allowedTCPPorts = [ 22 11434 ]; services.openssh = { enable = true; settings = { diff --git a/services/ollama.nix b/services/ollama.nix index 1f322b4..e946ac8 100644 --- a/services/ollama.nix +++ b/services/ollama.nix @@ -3,7 +3,14 @@ config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") { services.ollama.enable = true; - services.ollama.acceleration = "cuda"; + # nixpkgs ollama-cuda builds against CUDA 12.8, which requires driver ≥570. + # The Quadro M2000's legacy_535 driver only supports up to CUDA 12.2, + # so we override cudaPackages to build against 12.2 instead. + services.ollama.package = pkgs.ollama.override { + acceleration = "cuda"; + cudaPackages = pkgs.cudaPackages_12_2; + cudaArches = [ "sm_52" ]; # Maxwell GM206 compute capability + }; services.open-webui.enable = true; services.open-webui.port = 8888;