From 48f370d9a4112b3ff435f0d21517a4e5d90de396 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Sun, 17 Nov 2024 20:29:57 +0000 Subject: [PATCH] refactor(architect/llm.nix): comment out frontend vhost and container configurations - Commented out the `frontendDomain` vhost configuration - Updated backend port to use `ollamaPort` - Added `recommendedProxySettings = false;` for backend vhost - Commented out the entire OCI containers section for `ollama-webui` --- hosts/architect/llm.nix | 69 +++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/hosts/architect/llm.nix b/hosts/architect/llm.nix index 3b9bf02..bf46d56 100644 --- a/hosts/architect/llm.nix +++ b/hosts/architect/llm.nix @@ -20,34 +20,35 @@ in acceleration = "cuda"; package = ollamaPkg; environmentVariables = { - OLLAMA_ORIGINS = "*"; + # OLLAMA_ORIGINS = "10.0.0.0/24"; OLLAMA_FLASH_ATTENTION = "1"; OLLAMA_NUM_PARALLEL = "2"; }; }; - architect.vhost.${frontendDomain} = { - dnsInterfaces = [ "tailscale" "lan" ]; + # architect.vhost.${frontendDomain} = { + # dnsInterfaces = [ "tailscale" "lan" ]; - locations."/" = { - host = "127.0.0.1"; - port = frontendPort; - allowLan = true; - allowWAN = true; - extraConfig = '' - proxy_read_timeout 600s; - ''; - }; - }; + # locations."/" = { + # host = "127.0.0.1"; + # port = frontendPort; + # allowLan = true; + # allowWAN = true; + # extraConfig = '' + # proxy_read_timeout 600s; + # ''; + # }; + # }; architect.vhost.${backendDomain} = { dnsInterfaces = [ "tailscale" "lan" ]; locations."/" = { host = "127.0.0.1"; - port = 11434; + port = ollamaPort; allowLan = true; allowWAN = true; + recommendedProxySettings = false; extraConfig = '' proxy_buffering off; proxy_read_timeout 600s; @@ -56,27 +57,27 @@ in }; }; - virtualisation.oci-containers = { - containers = { - ollama-webui = { - image = "ghcr.io/open-webui/open-webui:main"; - autoStart = true; + # virtualisation.oci-containers = { + # containers = { + # ollama-webui = { + # image = "ghcr.io/open-webui/open-webui:main"; + # autoStart = true; - ports = [ - "127.0.0.1:${toString frontendPort}:8080" - ]; + # ports = [ + # "127.0.0.1:${toString frontendPort}:8080" + # ]; - environment = { - OLLAMA_BASE_URL = "https://${backendDomain}"; - }; + # environment = { + # OLLAMA_BASE_URL = "https://${backendDomain}"; + # }; - extraOptions = [ - "--pull=always" - ]; - volumes = [ - "/var/lib/ollama-webui:/app/backend/data" - ]; - }; - }; - }; + # extraOptions = [ + # "--pull=always" + # ]; + # volumes = [ + # "/var/lib/ollama-webui:/app/backend/data" + # ]; + # }; + # }; + # }; }