feat(llm): openwebui

This commit is contained in:
Giulio De Pasquale 2025-03-10 12:30:55 +00:00
parent d7a3a3bcf3
commit 1542d67202

View File

@ -10,16 +10,20 @@ in
systemPackages = [ ollamaPkg ]; systemPackages = [ ollamaPkg ];
}; };
services.ollama = { services = {
enable = true; ollama = {
enable = true;
package = ollamaPkg; package = ollamaPkg;
acceleration = "cuda"; acceleration = "cuda";
environmentVariables = { environmentVariables = {
OLLAMA_FLASH_ATTENTION = "1"; OLLAMA_FLASH_ATTENTION = "1";
OLLAMA_NUM_PARALLEL = "2"; OLLAMA_NUM_PARALLEL = "2";
OLLAMA_KV_CACHE_TYPE = "q8_0"; OLLAMA_KV_CACHE_TYPE = "q8_0";
};
}; };
open-webui.enable = true;
}; };
architect.vhost.${backendDomain} = { architect.vhost.${backendDomain} = {
@ -38,4 +42,15 @@ in
''; '';
}; };
}; };
architect.vhost.${frontendDomain} = {
dnsInterfaces = [ "tailscale" "lan" ];
locations."/" = {
host = config.services.open-webui.host;
port = config.services.open-webui.port;
allowLan = true;
allowWAN = true;
};
};
} }