add open-webui as ai chat ui service

This commit is contained in:
ulic-youthlic 2025-01-21 15:36:44 +08:00
parent c2884923bb
commit f66eec7079
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
4 changed files with 27 additions and 3 deletions

View file

@ -35,6 +35,7 @@
enable = true;
unixName = "david";
};
open-webui.enable = true;
};
gui.enabled = "cosmic";
};

View file

@ -27,6 +27,7 @@
./tailscale.nix
./kanata.nix
./kvm.nix
./open-webui.nix
];
config = {

View file

@ -0,0 +1,21 @@
{ config, lib, ... }:
let
cfg = config.youthlic.programs.open-webui;
in
{
options = {
youthlic.programs.open-webui = {
enable = lib.mkEnableOption "open-webui";
};
};
config = lib.mkIf cfg.enable {
services.open-webui = {
enable = true;
port = 8083;
environmentFile = "${config.sops.secrets."open-webui_env".path}";
};
sops.secrets."open-webui_env" = {
format = "yaml";
};
};
}