From 1df8e46bcfca3758bfb0c2d871db18124710a3e2 Mon Sep 17 00:00:00 2001 From: "K. Isom" Date: Thu, 25 Jun 2026 11:10:51 -0700 Subject: [PATCH] straylight: add open-webui with Ollama and RAG Co-Authored-By: Claude Sonnet 4.6 (1M context) --- hw/straylight/default.nix | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/hw/straylight/default.nix b/hw/straylight/default.nix index af8b97a..92afab8 100644 --- a/hw/straylight/default.nix +++ b/hw/straylight/default.nix @@ -63,8 +63,25 @@ # 443/8443/9443 for mc-proxy) as straylight takes over the core role. boot.kernel.sysctl."net.ipv4.ip_unprivileged_port_start" = 53; - # Open ports: DNS (53), mc-proxy (443/8443/9443), agent (9444), master (9555). - networking.firewall.allowedTCPPorts = [ 53 443 8443 9443 9444 9555 ]; + services.open-webui = { + enable = true; + host = "0.0.0.0"; + port = 8080; + environment = { + SCARF_NO_ANALYTICS = "True"; + DO_NOT_TRACK = "True"; + ANONYMIZED_TELEMETRY = "False"; + # Point at the local Ollama instance. + OLLAMA_BASE_URL = "http://127.0.0.1:11434"; + # Use Ollama for RAG embeddings (pull nomic-embed-text first). + RAG_EMBEDDING_ENGINE = "ollama"; + RAG_OLLAMA_BASE_URL = "http://127.0.0.1:11434"; + RAG_EMBEDDING_MODEL = "nomic-embed-text:latest"; + }; + }; + + # Open ports: DNS (53), mc-proxy (443/8443/9443), agent (9444), master (9555), open-webui (8080). + networking.firewall.allowedTCPPorts = [ 53 443 8080 8443 9443 9444 9555 ]; networking.firewall.allowedUDPPorts = [ 53 ]; # DNS: MCNS for internal zones, public resolvers as fallback.