diff --git a/hosts/default/open-webui.nix b/hosts/default/open-webui.nix new file mode 100644 index 0000000..f7724c5 --- /dev/null +++ b/hosts/default/open-webui.nix @@ -0,0 +1,25 @@ +{ + image = "ghcr.io/open-webui/open-webui:main"; + + environment = { + "TZ" = "America/New York"; + "OLLAMA_API_BASE_URL" = "http://127.0.0.1:11434/api"; + "OLLAMA_BASE_URL" = "http://127.0.0.1:11434"; + }; + + volumes = [ + "/home/wolcen/.openweb-ui:/app/backend/data" + ]; + + ports = [ + "127.0.0.1:3000:8080" # Ensures we listen only on localhost + ]; + + extraOptions = [ + "--pull=newer" # Pull if the image on the registry is newer + "--name=open-webui" + "--hostname=open-webui" + "--network=host" + "--add-host=host.containers.internal:host-gateway" + ]; +};