fix ollama, remove trr #190

Merged
ahuston-0 merged 1 commits from feature/ollama into main 2026-03-21 23:45:01 -04:00
4 changed files with 20 additions and 2 deletions
Showing only changes of commit d3ba187c8a - Show all commits

View File

@@ -80,7 +80,6 @@
users.users = { users.users = {
alice.extraGroups = [ "calibre-web" ]; alice.extraGroups = [ "calibre-web" ];
}; };
users.groups.ollama = { };
system.stateVersion = "24.05"; system.stateVersion = "24.05";

View File

@@ -20,7 +20,7 @@
./nextcloud.nix ./nextcloud.nix
# ./postgres.nix # ./postgres.nix
# ./restic.nix # ./restic.nix
./torr.nix #./torr.nix
# ./unifi.nix # ./unifi.nix
]; ];

View File

@@ -2,6 +2,9 @@
pkgs, pkgs,
... ...
}: }:
let
vars = import ./vars.nix;
in
{ {
services = { services = {
ollama = { ollama = {
@@ -20,6 +23,7 @@
"qwen2.5-coder:1.5b-base" "qwen2.5-coder:1.5b-base"
"nomic-embed-text:latest" "nomic-embed-text:latest"
]; ];
models = vars.primary_ollama;
environmentVariables = { environmentVariables = {
FLASH_ATTENTION = "1"; FLASH_ATTENTION = "1";
OLLAMA_KV_CACHE_TYPE = "q8_0"; OLLAMA_KV_CACHE_TYPE = "q8_0";
@@ -35,10 +39,12 @@
# context length for agents # context length for agents
OLLAMA_CONTEXT_LENGTH = "64000"; OLLAMA_CONTEXT_LENGTH = "64000";
}; };
openFirewall = true;
}; };
open-webui = { open-webui = {
enable = true; enable = true;
port = 21212; port = 21212;
openFirewall = true;
}; };
}; };
users.users.ollama = { users.users.ollama = {
@@ -50,4 +56,16 @@
isSystemUser = true; isSystemUser = true;
}; };
users.groups.ollama = { }; users.groups.ollama = { };
systemd.services = {
ollama.serviceConfig = {
Nice = 19;
IOSchedulingPriority = 7;
};
ollama-model-loader.serviceConfig = {
Nice = 19;
CPUWeight = 50;
IOSchedulingClass = "idle";
IOSchedulingPriority = 7;
};
};
} }

View File

@@ -19,4 +19,5 @@ rec {
primary_torr = "${zfs_primary}/torr"; primary_torr = "${zfs_primary}/torr";
primary_plex = "${zfs_primary}/plex"; primary_plex = "${zfs_primary}/plex";
primary_plex_storage = "${zfs_primary}/plex_storage"; primary_plex_storage = "${zfs_primary}/plex_storage";
primary_ollama = "${zfs_primary}/ollama";
} }