hosts/library: add open-webui
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m17s
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m17s
This commit is contained in:
34
hosts/library/ai.nix
Normal file
34
hosts/library/ai.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
age.secrets."files/services/open-webui/envfile" = {
|
||||
file = "${inputs.secrets}/files/services/open-webui/envfile.age";
|
||||
};
|
||||
|
||||
services.open-webui = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.open-webui;
|
||||
port = 8081;
|
||||
environment =
|
||||
let
|
||||
clientId = "open-webui";
|
||||
publicUrl = "https://chat.ai.vimium.com";
|
||||
in
|
||||
{
|
||||
WEBUI_URL = publicUrl;
|
||||
ENABLE_LOGIN_FORM = "False";
|
||||
ENABLE_OAUTH_SIGNUP = "True";
|
||||
ENABLE_OAUTH_ROLE_MANAGEMENT = "True";
|
||||
OAUTH_CLIENT_ID = clientId;
|
||||
OAUTH_PROVIDER_NAME = "Vimium";
|
||||
OPENID_PROVIDER_URL = "https://auth.vimium.com/oauth2/openid/${clientId}/.well-known/openid-configuration";
|
||||
OPENID_REDIRECT_URI = "${publicUrl}/oauth/oidc/callback";
|
||||
};
|
||||
environmentFile = config.age.secrets."files/services/open-webui/envfile".path;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user