mirror of
https://github.com/tuxdotrs/nixos-config.git
synced 2025-07-06 09:46:34 +05:30
feat: setup nginx for open webui
This commit is contained in:
@ -1,11 +1,35 @@
|
|||||||
{...}: {
|
{
|
||||||
services.open-webui = {
|
lib,
|
||||||
enable = true;
|
config,
|
||||||
openFirewall = true;
|
...
|
||||||
host = "0.0.0.0";
|
}: {
|
||||||
environment = {
|
services = {
|
||||||
ENABLE_OLLAMA_API = "True";
|
open-webui = {
|
||||||
OLLAMA_BASE_URL = "http://pc:11434";
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
host = "0.0.0.0";
|
||||||
|
port = 1111;
|
||||||
|
environment = {
|
||||||
|
WEBUI_URL = "https://chat.tux.rs";
|
||||||
|
ENABLE_OLLAMA_API = "True";
|
||||||
|
OLLAMA_BASE_URL = "http://pc:11434";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nginx = {
|
||||||
|
enable = lib.mkForce true;
|
||||||
|
virtualHosts = {
|
||||||
|
"chat.tux.rs" = {
|
||||||
|
forceSSL = true;
|
||||||
|
useACMEHost = "tux.rs";
|
||||||
|
locations = {
|
||||||
|
"/" = {
|
||||||
|
proxyPass = "http://${config.services.open-webui.host}:${toString config.services.open-webui.port}";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user