nix-config/config/services/ollama.nix

50 lines
1.2 KiB
Nix
Raw Normal View History

{ config, globals, ... }:
2024-07-26 22:12:48 +02:00
{
2024-12-20 20:40:27 +01:00
wireguard.services = {
client.via = "nucnix";
firewallRuleForNode.${globals.services.nginx.host}.allowedTCPPorts = [
config.services.open-webui.port
];
firewallRuleForNode.${globals.services.homeassistant.host}.allowedTCPPorts = [
config.services.ollama.port
];
2024-06-09 20:58:27 +02:00
};
services.ollama = {
host = "0.0.0.0";
2024-06-09 20:58:27 +02:00
port = 3001;
enable = true;
};
services.open-webui = {
host = "0.0.0.0";
port = 3000;
2024-11-03 21:33:48 +01:00
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";
}
];
environment.persistence."/renaultft".directories = [
{
directory = "/var/lib/private/ollama";
mode = "0700";
}
];
}