cosmic checkpoint
This commit is contained in:
parent
4031a614a8
commit
f623faa0ef
26 changed files with 1163 additions and 538 deletions
40
home/programs/openwebui.nix
Normal file
40
home/programs/openwebui.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
port = 3021;
|
||||
in {
|
||||
imports = [./ollama.nix];
|
||||
|
||||
localWebApps = {
|
||||
openwebui = {
|
||||
name = "OpenWebUI";
|
||||
genericName = "LLM";
|
||||
icon = ../icons/openwebui.png;
|
||||
inherit port;
|
||||
requires.containers = ["openwebui" "ollama"];
|
||||
};
|
||||
};
|
||||
|
||||
services.podman = {
|
||||
containers.openwebui = let
|
||||
str = builtins.toString;
|
||||
in {
|
||||
# serviceName = "openwebui";
|
||||
image = "ghcr.io/open-webui/open-webui:main";
|
||||
ports = ["${str port}:${str port}"];
|
||||
environment = {
|
||||
WEBUI_AUTH = "False";
|
||||
PORT = "${str port}";
|
||||
};
|
||||
autostart = false;
|
||||
networks = ["ollama"];
|
||||
unitConfig = {Requires = ["podman-ollama.service"];};
|
||||
extraOptions = [
|
||||
"--health-cmd"
|
||||
(lib.escapeShellArg "bash -c 'cat < /dev/null > /dev/tcp/localhost/${str port}'")
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue