Skip to content

Commit 1941945

Browse files
committed
feat(glyph): configure Open WebUI security and API secrets
Add agenix-managed environment file for WEBUI_SECRET_KEY and API keys. Harden configuration: disable signup, set session cookie secure flag, configure CORS and WEBUI_URL for chat.zx.dev, and disable persistent config to enforce env-var-only settings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8594db4 commit 1941945

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

579 Bytes
Binary file not shown.
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
{
2-
config,
3-
pkgs,
4-
...
5-
}: {
1+
{config, ...}: {
2+
age.secrets.open-webui-env.file = ./../secrets/open-webui-env.age;
3+
64
services.open-webui = {
75
enable = true;
86
port = 8888;
97
host = "0.0.0.0";
8+
environmentFile = config.age.secrets.open-webui-env.path;
109
environment = {
1110
ENABLE_OLLAMA_API = "False";
11+
ENABLE_SIGNUP = "False";
12+
ENABLE_PERSISTENT_CONFIG = "False";
13+
WEBUI_URL = "https://chat.zx.dev";
14+
WEBUI_SESSION_COOKIE_SECURE = "True";
15+
CORS_ALLOW_ORIGIN = "https://chat.zx.dev";
1216
};
1317
};
1418
}

‎lib/secrets/glyph.nix‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ in {
66
"hosts/glyph/secrets/pushover-user-token.age".publicKeys = keys;
77
"hosts/glyph/secrets/kagi-api-key.age".publicKeys = keys;
88
"hosts/glyph/secrets/context7-api-key.age".publicKeys = keys;
9+
"hosts/glyph/secrets/open-webui-env.age".publicKeys = keys;
910
}

0 commit comments

Comments
 (0)