edit config

This commit is contained in:
Harivansh Rathi 2026-04-03 17:24:47 +00:00
parent 630ec774ce
commit 032d2deb21
2 changed files with 44 additions and 40 deletions

View file

@ -1,49 +1,51 @@
{ {
gateway: { "gateway": {
mode: "local", "mode": "local",
bind: "loopback", "bind": "loopback",
port: 2470, "port": 2470,
trustedProxies: ["127.0.0.1", "::1"], "trustedProxies": ["127.0.0.1", "::1"],
controlUi: { "auth": {
enabled: true, "mode": "token",
allowedOrigins: ["https://netty.harivan.sh"], "token": "${OPENCLAW_GATEWAY_TOKEN}"
},
auth: {
mode: "token",
token: "${OPENCLAW_GATEWAY_TOKEN}",
}, },
"controlUi": {
"allowedOrigins": ["https://netty.harivan.sh"]
}
}, },
channels: { "channels": {
telegram: { "telegram": {
enabled: true, "enabled": true,
botToken: "${TELEGRAM_BOT_TOKEN}", "botToken": "${TELEGRAM_BOT_TOKEN}",
dmPolicy: "pairing", "dmPolicy": "pairing"
}, }
}, },
agents: { "session": {
defaults: { "dmScope": "per-channel-peer",
workspace: "~/.openclaw/workspace", "reset": { "mode": "idle", "idleMinutes": 120 }
model: { },
primary: "anthropic/claude-sonnet-4-6",
"agents": {
"defaults": {
"workspace": "~/.openclaw/workspace",
"model": {
"primary": "anthropic/claude-sonnet-4-6",
"fallbacks": ["anthropic/claude-haiku-4-5-20251001"]
}, },
sandbox: { "contextTokens": 200000,
mode: "non-main", "thinkingDefault": "adaptive",
}, "sandbox": { "mode": "non-main" },
}, "compaction": { "mode": "default", "notifyUser": true }
}
}, },
tools: { "tools": {
profile: "coding", "profile": "full",
deny: [ "deny": ["gateway"]
"browser",
"canvas",
"cron",
"gateway",
"nodes",
"sessions_send",
"sessions_spawn",
],
}, },
"logging": {
"redactSensitive": "tools"
}
} }

View file

@ -8,6 +8,7 @@
let let
openClawStateDir = "${config.home.homeDirectory}/.openclaw"; openClawStateDir = "${config.home.homeDirectory}/.openclaw";
openClawWorkspaceDir = "${openClawStateDir}/workspace"; openClawWorkspaceDir = "${openClawStateDir}/workspace";
openClawVersion = "2026.4.2";
npmDir = "${config.xdg.dataHome}/npm"; npmDir = "${config.xdg.dataHome}/npm";
in in
lib.mkIf hostConfig.isLinux { lib.mkIf hostConfig.isLinux {
@ -22,8 +23,9 @@ lib.mkIf hostConfig.isLinux {
export XDG_DATA_HOME="${config.xdg.dataHome}" export XDG_DATA_HOME="${config.xdg.dataHome}"
export XDG_CACHE_HOME="${config.xdg.cacheHome}" export XDG_CACHE_HOME="${config.xdg.cacheHome}"
if [ ! -d "${npmDir}/lib/node_modules/openclaw" ]; then INSTALLED=$(npm ls -g openclaw --depth=0 --json 2>/dev/null | ${pkgs.jq}/bin/jq -r '.dependencies.openclaw.version // empty')
npm install -g openclaw@latest 2>/dev/null || true if [ "$INSTALLED" != "${openClawVersion}" ]; then
npm install -g "openclaw@${openClawVersion}" 2>/dev/null || true
fi fi
''; '';