nix-config/config/services/ollama.nix

42 lines
1 KiB
Nix
Raw Normal View History

2024-06-09 20:58:27 +02:00
{config, ...}: {
wireguard.elisabeth = {
client.via = "elisabeth";
firewallRuleForNode.elisabeth.allowedTCPPorts = [config.services.open-webui.port];
};
services.ollama = {
2024-06-09 20:58:27 +02:00
host = "localhost";
port = 3001;
enable = true;
};
services.open-webui = {
host = "0.0.0.0";
port = 3000;
enable = true;
2024-06-09 20:58:27 +02:00
environment = {
2024-06-10 15:15:12 +02:00
ENV = "prod";
2024-06-09 20:58:27 +02:00
OLLAMA_BASE_URL = "http://localhost:3001";
ANONYMIZED_TELEMETRY = "False";
DO_NOT_TRACK = "True";
SCARF_NO_ANALYTICS = "True";
TRANSFORMERS_CACHE = "/var/lib/open-webui/cache/huggingface";
WEBUI_AUTH_TRUSTED_EMAIL_HEADER = "X-Email";
2024-06-10 15:15:12 +02:00
ENABLE_COMMUNITY_SHARING = "False";
ENABLE_ADMIN_EXPORT = "False";
WEBUI_AUTH = "False";
ENABLE_SIGNUP = "False";
DEFAULT_USER_ROLE = "user";
2024-06-09 20:58:27 +02:00
};
};
environment.persistence."/state".directories = [
2024-06-09 20:58:27 +02:00
{
directory = "/var/lib/private/open-webui";
mode = "0700";
}
{
directory = "/var/lib/private/ollama";
mode = "0700";
}
];
}