fix ollama, remove trr #190
@@ -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";
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
# ./postgres.nix
|
# ./postgres.nix
|
||||||
# ./restic.nix
|
# ./restic.nix
|
||||||
./torr.nix
|
#./torr.nix
|
||||||
# ./unifi.nix
|
# ./unifi.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user