diff options
Diffstat (limited to 'nixos/modules/services/misc/ollama.nix')
-rw-r--r-- | nixos/modules/services/misc/ollama.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/nixos/modules/services/misc/ollama.nix b/nixos/modules/services/misc/ollama.nix index 30c2b26d8322e..b2c3de09015b9 100644 --- a/nixos/modules/services/misc/ollama.nix +++ b/nixos/modules/services/misc/ollama.nix @@ -40,14 +40,19 @@ in ''; }; acceleration = lib.mkOption { - type = types.nullOr (types.enum [ "rocm" "cuda" ]); + type = types.nullOr (types.enum [ false "rocm" "cuda" ]); default = null; example = "rocm"; description = '' What interface to use for hardware acceleration. - - `rocm`: supported by modern AMD GPUs - - `cuda`: supported by modern NVIDIA GPUs + - `null`: default behavior + if `nixpkgs.config.rocmSupport` is enabled, uses `"rocm"` + if `nixpkgs.config.cudaSupport` is enabled, uses `"cuda"` + otherwise defaults to `false` + - `false`: disable GPU, only use CPU + - `"rocm"`: supported by most modern AMD GPUs + - `"cuda"`: supported by most modern NVIDIA GPUs ''; }; environmentVariables = lib.mkOption { |