Skip to content

ollama

Whether to enable Ollama server for local large language models.

Type: boolean

Default:

false

Example:

true

Declared by:

Which package of Ollama to use.

Hardware acceleration depends on the package: use pkgs.ollama-cuda, pkgs.ollama-rocm or pkgs.ollama-vulkan for GPU support on Linux. On macOS, pkgs.ollama uses Metal.

Type: package

Default:

pkgs.ollama

Example:

pkgs.ollama-cuda

Declared by:

Additional environment variables for the Ollama server process. See ollama serve --help for available options.

Type: attribute set of string

Default:

{ }

Example:

{
OLLAMA_CONTEXT_LENGTH = "8192";
OLLAMA_KEEP_ALIVE = "10m";
}

Declared by:

The host address the Ollama HTTP server listens on. Wrap IPv6 addresses in brackets.

Type: string

Default:

"127.0.0.1"

Example:

"[::]"

Declared by:

Models to download with ollama pull once the server is ready. Models that are already present are not downloaded again.

Search for models at https://ollama.com/library.

Type: list of string

Default:

[ ]

Example:

[
"gemma3"
"qwen3:0.6b"
]

Declared by:

The directory Ollama reads models from and downloads new models to.

Point this at a shared location (such as ~/.ollama/models, as an absolute path) to reuse models across projects instead of downloading them per project.

Type: string

Default:

"${config.devenv.state}/ollama/models"

Example:

"/home/user/.ollama/models"

Declared by:

The base port the Ollama HTTP server listens on. The actual port is allocated by devenv and may differ; OLLAMA_HOST and OLLAMA_BASE_URL point to it.

Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Default:

11434

Declared by: