Skip to content

feat(home): install OpenClaw gateway via nix-openclaw - #1025

Merged
dezren39 merged 2 commits into
mainfrom
feat/openclaw
Oct 26, 2026
Merged

dezren39 merged 2 commits into
mainfrom
feat/openclaw

Conversation

@dezren39

@dezren39 dezren39 commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Installs OpenClaw (via github:openclaw/nix-openclaw) on the laptop as an on-boot Home Manager user service.

  • Gateway: tailnet-bound :18789, token auth from a local secret file (referenced by path only), local mode.
  • Models: fleet loopback provider proxies — DeepSeek v4 Flash via CommandCode is the default; Design/Antigravity/Kimi fallbacks; the Codex/OpenAI proxy is registered under the id codex-proxy (plain codex is a legacy provider name upstream) but deliberately NOT an automatic fallback (final reserve, per quota discipline). The main agent entry carries no default marker — with ownership=explicit a marker is a legacy key upstream rejects in Nix mode.
  • Coding: ACP via acpx with OpenCode (the OpenChamber engine, pinned fork build) as the ACP harness. The embedded acpx runtime takes per-agent commands from plugins.entries.acpx.config.agents (set to the system-profile fork binary); ~/.acpx/config.json is also declared for the standalone CLI. allowedAgents is opencode-only for now: the acpx startup check initializes every allowed agent and the other harnesses resolve to npx-fetched adapters (upstream Claude/Codex still work via their native runtime plugins).
  • Plugins: 18 runtime plugins (channels loaded but inert pending Drew-side app setup; providers; search) and bundled tool plugins (gogcli, goplaces, sag, camsnap, discrawl, wacrawl, qmd). summarize disabled for now — its ~780-package pnpm deps fetch kept dying on the flaky npmjs route; one-line re-enable later. peekaboo/poltergeist are macOS-only in the catalog.
  • MCP: codedb, fff, context7, desktop-commander (mirroring mcpx).
  • Context pack in home/openclaw/workspace: fleet roles (Muse/Archer, Aster/Dot, OpenChamber, OpenClaw), the four repos, git/merge discipline, quota rules, laptop service map. Hourly heartbeat.

Upstream quirk: predeclared agents.entries.*.runtime ACP agents are rejected by the pinned nix-openclaw schema (runtime is a oneOf of submodules; minimal repro verified), so ACP agents spawn on demand via the top-level acp config — verified working.

Verified on amd: full flake eval passes; activation applied; openclaw-gateway active, enabled (linked) + linger, listening on the tailnet address; openclaw status healthy; agent smoke test answers with correct identity/fleet/default model; ACP end-to-end: embedded acpx backend ready and /acp spawn opencode created a persistent session on the fork build (v2.0.30+56590c5).

Canonical follow-up (Drew, whenever): sudo nixos-rebuild switch --flake ~/code#amd after merge, so the running config comes from main.

Home Manager module (home/openclaw) running the OpenClaw gateway as an on-boot user service on the laptop: tailnet-bound on :18789, token auth from a local secret file, fleet provider proxies for models (DeepSeek v4 Flash default via CommandCode; Codex/OpenAI held as final reserve), runtime + bundled tool plugins, ACP (acpx) with OpenCode (the OpenChamber engine) as default coding harness, MCP servers mirroring mcpx, and a workspace context pack (fleet roles, repos, quota discipline, git/merge rules).

Notes: summarize bundled plugin disabled for now (its ~780-package pnpm deps fetch kept dying on the flaky npmjs route; re-enable later). peekaboo/poltergeist are macOS-only in the nix-openclaw catalog. Predeclared agents.entries ACP runtimes are rejected by the pinned nix-openclaw schema; ACP agents spawn on demand via the top-level acp config.
@dezren39
dezren39 requested a review from a team as a code owner October 26, 2026 22:58
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bf62a437-ebe6-4e76-971d-f47f95d63f68
Commits

Reviewing files that changed from the base of the PR and between b4363ea and fb2eb9d.

Files ignored due to path filters: 1
  • flake.lock is excluded by !**/*.lock
Files selected for processing: 14
  • flake.nix
  • home/openclaw/README.md
  • home/openclaw/default.nix
  • home/openclaw/workspace/AGENTS.md
  • home/openclaw/workspace/CHANNELS.md
  • home/openclaw/workspace/FLEET.md
  • home/openclaw/workspace/HEARTBEAT.md
  • home/openclaw/workspace/IDENTITY.md
  • home/openclaw/workspace/QUOTAS.md
  • home/openclaw/workspace/SOUL.md
  • home/openclaw/workspace/TOOLS.md
  • home/openclaw/workspace/USER.md
  • home/user/default.nix
  • nixos/nixpkgs/default.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T23:28:18.749049Z fb2eb9d New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2491cae5b9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread home/openclaw/default.nix
baseUrl = "http://127.0.0.1:${toString port}/v1";
# The laptop proxies are loopback-only and do not check an API key;
# this is a placeholder label, not a credential.
apiKey = "local-proxy";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use a placeholder key recognized by the Design proxy

When the primary provider fails and OpenClaw selects the Design fallback, Bearer local-proxy is treated as a real upstream credential: bin/design-code-proxy.mjs:63-74 only recognizes placeholders such as local and design-local. The proxy consequently forwards the request to AMR Link with this invalid key and passes authentication errors back instead of using its local dispatch (bin/design-code-proxy.mjs:137-172), making the first configured fallback unusable. Use an accepted placeholder, or configure the key separately for each provider.

Useful? React with 👍 / 👎.

Comment thread home/openclaw/default.nix
agyProxyPort = 18743;
codexProxyPort = 18744;
localProvider = port: models: {
baseUrl = "http://127.0.0.1:${toString port}/v1";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve the active proxy endpoint instead of fixing its port

After an Antigravity proxy artifact update, the existing A/B supervisor moves its listener from 18743 to 19743 and drains the old instance (bin/proxy-supervise.mjs:493-496,568-579), publishing the replacement URL in ~/.local/state/agy-proxy/endpoint.json. This provider URL remains fixed at 18743, so OpenClaw's Antigravity fallback becomes unavailable despite a healthy replacement proxy. The legacy service started through Wants does not recover after cutover because it has Restart = "no" (home/common/default.nix:508). Resolve the published endpoint or provide a stable forwarding endpoint so proxy updates do not strand the gateway.

Useful? React with 👍 / 👎.

Comment thread home/openclaw/default.nix
agents = {
defaults = {
model = {
primary = "commandcode/deepseek/deepseek-v4-flash";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a tool-calling endpoint for the gateway's primary model

For requests requiring OpenClaw-native tools, this primary endpoint cannot return the necessary function calls. bin/commandcode-proxy.mjs:827-844 reduces supplied tools to a truncated name/description manifest, and line 248 instructs CommandCode to substitute its own file/shell tools; both response paths at lines 1174-1204 return only text with finish_reason: "stop", never tool_calls. Consequently normal agent turns cannot invoke OpenClaw's own tools, including the configured ACP delegation through sessions_spawn, and successful text responses do not trigger the fallback chain. Select a function-calling endpoint or implement a proper tool-call relay before using this proxy as the gateway's primary model.

Useful? React with 👍 / 👎.

The embedded acpx runtime ignores ~/.acpx/config.json; per-agent commands belong in plugins.entries.acpx.config.agents. Without the override acpx defaults to npx -y opencode-ai acp (upstream v1), which rejects the fleet v2 config and hangs on the flaky npmjs route during the backend startup check. Also trim acp.allowedAgents to opencode only (the check initializes every allowed agent; other harnesses are npx adapters for now). Verified: acpx backend ready, /acp spawn opencode creates a persistent session.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant