diff options
author | shivaraj-bh <sbh69840@gmail.com> | 2024-06-04 16:07:06 +0530 |
---|---|---|
committer | shivaraj-bh <sbh69840@gmail.com> | 2024-06-04 16:46:19 +0530 |
commit | f66cb82fef9d3f02cb1f72744e9493116aa41408 (patch) | |
tree | 7cf06521f0c69f6457a85ec79420e6c658629b7f /nixos/tests/open-webui.nix | |
parent | 1860d7862be0fb8a7c240234befd3250f1ce773f (diff) |
nixos/open-webui: init
Diffstat (limited to 'nixos/tests/open-webui.nix')
-rw-r--r-- | nixos/tests/open-webui.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/nixos/tests/open-webui.nix b/nixos/tests/open-webui.nix new file mode 100644 index 0000000000000..f10ef1ad98fb0 --- /dev/null +++ b/nixos/tests/open-webui.nix @@ -0,0 +1,33 @@ +{ lib, ... }: +let + mainPort = "8080"; +in +{ + name = "open-webui"; + meta = with lib.maintainers; { + maintainers = [ shivaraj-bh ]; + }; + + nodes = { + machine = + { ... }: + { + services.open-webui = { + enable = true; + environment = { + # Requires network connection + RAG_EMBEDDING_MODEL = ""; + }; + }; + }; + }; + + testScript = '' + machine.start() + + machine.wait_for_unit("open-webui.service") + machine.wait_for_open_port(${mainPort}) + + machine.succeed("curl http://127.0.0.1:${mainPort}") + ''; +} |