Add support for websockets

This commit is contained in:
muon 2025-01-27 21:30:11 +00:00
parent d52d63ea69
commit 5785a3bb84
2 changed files with 8 additions and 3 deletions

View file

@ -15,7 +15,7 @@ in with lib; {
config = mkIf cfg.enable {
services.ollama = {
enable = true;
loadModels = [ "deepseek-r1:7b" ];
loadModels = [ "deepseek-r1:1.5b" "deepseek-r1:7b" "deepseek-r1:8b" ];
};
@ -29,7 +29,7 @@ in with lib; {
SCARF_NO_ANALYTICS = "True";
OLLAMA_API_BASE_URL = "http://127.0.0.1:11434";
# Disable authentication
WEBUI_AUTH = "False";
# WEBUI_AUTH = "False";
};
inherit port;

View file

@ -90,7 +90,12 @@ in with lib; {
enableACME = true;
};
proxy = port:
base { "/".proxyPass = "http://${cfg.ip}:${toString port}/"; };
base {
"/" = {
proxyPass = "http://${cfg.ip}:${toString port}/";
proxyWebsockets = true;
};
};
in mapAttrs' (name: port:
nameValuePair ("${name}.${cfg.domain}")
# (proxy port // { default = true; })) cfg.ports;