services.ollama.environmentVariables

Set arbitrary environment variables for the ollama service.

Be aware that these are only seen by the ollama server (systemd service), not normal invocations like ollama run. Since ollama run is mostly a shell around the ollama server, this is usually sufficient.

Type
attribute set of string
Default
{ }
Example
{
  HIP_VISIBLE_DEVICES = "0,1";
  OLLAMA_LLM_LIBRARY = "cpu";
}
Declared
<home-manager/modules/services/ollama.nix>