From 1542d67202419f4b041d371a0fe0a0dc41b364fa Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Mon, 10 Mar 2025 12:30:55 +0000 Subject: [PATCH] feat(llm): openwebui --- hosts/architect/llm.nix | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/hosts/architect/llm.nix b/hosts/architect/llm.nix index ce62c55..a1a8971 100644 --- a/hosts/architect/llm.nix +++ b/hosts/architect/llm.nix @@ -10,16 +10,20 @@ in systemPackages = [ ollamaPkg ]; }; - services.ollama = { - enable = true; + services = { + ollama = { + enable = true; - package = ollamaPkg; - acceleration = "cuda"; - environmentVariables = { - OLLAMA_FLASH_ATTENTION = "1"; - OLLAMA_NUM_PARALLEL = "2"; - OLLAMA_KV_CACHE_TYPE = "q8_0"; + package = ollamaPkg; + acceleration = "cuda"; + environmentVariables = { + OLLAMA_FLASH_ATTENTION = "1"; + OLLAMA_NUM_PARALLEL = "2"; + OLLAMA_KV_CACHE_TYPE = "q8_0"; + }; }; + + open-webui.enable = true; }; 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; + }; + }; }