Files
nixos/henrovnix_ok/configuration/apps/ai.nix
T
2026-02-24 09:19:39 +01:00

26 lines
683 B
Nix

{ config, lib, pkgs, ... }:
{
# Ollama server als systemd service
services.ollama = {
enable = true;
# Optioneel: "cuda" (NVIDIA) of "rocm" (AMD)
# Laat weg of zet op null/false als je CPU-only wilt.
acceleration = "cuda";
# acceleration = "rocm";
# Laat NixOS de modellen automatisch pullen zodra de service draait
# (via `ollama pull ...`)
loadModels = [
"qwen2.5-coder:7b"
"qwen2.5-coder:32b"
"starcoder2:15b"
# Alternatief:
# "starcoder2:7b"
# "starcoder2:latest"
];
};
# Installeer de CLI tool (handig voor 'ollama run', 'ollama list', etc.)
environment.systemPackages = [
pkgs.ollama
];
}