fix ollama on amd-workstation
This commit is contained in:
parent
35d6d350cc
commit
481229eb8b
@ -10,9 +10,10 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
host = "127.0.0.1";
|
host = "127.0.0.1";
|
||||||
port = 11434;
|
port = 11434;
|
||||||
|
openFirewall = false;
|
||||||
user = "ollama";
|
user = "ollama";
|
||||||
group = "ollama";
|
group = "ollama";
|
||||||
openFirewall = false;
|
home = "/srv/ollama";
|
||||||
acceleration =
|
acceleration =
|
||||||
if gpu == "amd" then
|
if gpu == "amd" then
|
||||||
"rocm"
|
"rocm"
|
||||||
@ -29,6 +30,7 @@ in {
|
|||||||
host = "127.0.0.1";
|
host = "127.0.0.1";
|
||||||
port = 8080;
|
port = 8080;
|
||||||
openFirewall = false;
|
openFirewall = false;
|
||||||
|
stateDir = "/srv/open-webui";
|
||||||
environment = {
|
environment = {
|
||||||
ANONYMIZED_TELEMETRY = "False";
|
ANONYMIZED_TELEMETRY = "False";
|
||||||
DO_NOT_TRACK = "True";
|
DO_NOT_TRACK = "True";
|
||||||
@ -37,7 +39,6 @@ in {
|
|||||||
# Disable authentication
|
# Disable authentication
|
||||||
WEBUI_AUTH = "False";
|
WEBUI_AUTH = "False";
|
||||||
ENABLE_SIGNUP = "False";
|
ENABLE_SIGNUP = "False";
|
||||||
WEBUI_URL = "http://localhost:8080";
|
|
||||||
# Search
|
# Search
|
||||||
ENABLE_RAG_WEB_SEARCH = "True";
|
ENABLE_RAG_WEB_SEARCH = "True";
|
||||||
RAG_WEB_SEARCH_ENGINE = "searxng";
|
RAG_WEB_SEARCH_ENGINE = "searxng";
|
||||||
@ -73,19 +74,20 @@ in {
|
|||||||
environmentFile = config.sops.secrets.searx-env.path;
|
environmentFile = config.sops.secrets.searx-env.path;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.ollama.extraGroups = [ "video" "render" ];
|
# users.users.ollama.extraGroups = [ "video" "render" ];
|
||||||
|
|
||||||
systemd.services.ollama.serviceConfig = {
|
systemd.services.ollama.serviceConfig = {
|
||||||
DynamicUser = lib.mkForce false;
|
DynamicUser = lib.mkForce false;
|
||||||
};
|
};
|
||||||
systemd.services.open-webui.serviceConfig = {
|
systemd.services.open-webui.serviceConfig = {
|
||||||
DynamicUser = lib.mkForce false;
|
DynamicUser = lib.mkForce false;
|
||||||
User = "ollama";
|
User = config.services.ollama.user;
|
||||||
Group = "ollama";
|
Group = config.services.ollama.group;
|
||||||
};
|
};
|
||||||
|
|
||||||
persist.state.directories = [
|
persist.state.directories =
|
||||||
"/var/lib/ollama"
|
lib.mkIf (config.deviceSpecific.devInfo.fileSystem != "zfs") [
|
||||||
"/var/lib/open-webui"
|
config.services.ollama.home
|
||||||
];
|
config.services.open-webui.stateDir
|
||||||
|
];
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user