diff options
Diffstat (limited to 'nixos/modules/services/misc/ollama.nix')
-rw-r--r-- | nixos/modules/services/misc/ollama.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nixos/modules/services/misc/ollama.nix b/nixos/modules/services/misc/ollama.nix index 0d3574a2bac0..7784f3170cef 100644 --- a/nixos/modules/services/misc/ollama.nix +++ b/nixos/modules/services/misc/ollama.nix @@ -1,11 +1,13 @@ { config, lib, pkgs, ... }: let - inherit (lib.types) nullOr enum; + inherit (lib) types; cfg = config.services.ollama; ollamaPackage = cfg.package.override { inherit (cfg) acceleration; - linuxPackages.nvidia_x11 = config.hardware.nvidia.package; + linuxPackages = config.boot.kernelPackages.overrideAttrs { + nvidia_x11 = config.hardware.nvidia.package; + }; }; in { @@ -15,14 +17,14 @@ in lib.mdDoc "Server for local large language models" ); listenAddress = lib.mkOption { - type = lib.types.str; + type = types.str; default = "127.0.0.1:11434"; description = lib.mdDoc '' Specifies the bind address on which the ollama server HTTP interface listens. ''; }; acceleration = lib.mkOption { - type = nullOr (enum [ "rocm" "cuda" ]); + type = types.nullOr (types.enum [ "rocm" "cuda" ]); default = null; example = "rocm"; description = lib.mdDoc '' |