Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions hosts/nuc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,11 @@ in
kind = "group";
agentId = "finn";
}
{
peerId = "-1003862456724:topic:252"; # Anne
kind = "group";
agentId = "anne";
}
];
};
};
Expand Down
26 changes: 16 additions & 10 deletions modules/desktop/apps/openclaw/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ modules/desktop/apps/openclaw/
## Key Facts

- **Install method**: Homebrew cask (`openclaw`)
- **Gateway mode**: Remote — connects via Tailscale service VIP `wss://openclaw.cinnamon-rooster.ts.net`
- **Gateway mode**: Remote direct — connects via Tailscale service VIP `wss://openclaw.cinnamon-rooster.ts.net`
- **Option path**: `modules.desktop.apps.openclaw.enable`
- **No local gateway**: `appDefaults.attachExistingOnly = true`
- **launchd managed**: `launchd.enable = true` for background connectivity
- **No local launchd gateway**: `launchd.enable = false` in remote mode

## Configuration

Expand All @@ -25,23 +25,29 @@ Instance config at `programs.openclaw.instances.default.config`:
- `gateway.mode = "remote"` — no local gateway process
- `agents.defaults.thinkingDefault = "high"` — default thinking budget
- Gateway token injected at activation from agenix secret
- SSH alias `nuc` is still available in SSH config as a fallback

## Token Injection
## Hybrid setup

Config is a Nix store symlink (read-only). The `openclawInjectToken` activation script:
The module now keeps **Tailscale direct** as the primary connection path:

1. Copies the symlinked config to a regular file
2. Replaces `__OPENCLAW_TOKEN_PLACEHOLDER__` with the agenix secret
3. Moves the patched file into place
1. OpenClaw.app runs in remote mode
2. `gateway.remote.transport = "direct"`
3. `gateway.remote.url = "wss://openclaw.cinnamon-rooster.ts.net"`
4. Gateway token is injected from agenix at activation

Separately, dotfiles also provide `ssh nuc` as a fallback/admin path.

This keeps the app on the Tailscale gateway while preserving an SSH alias for troubleshooting or future SSH-based pairing workflows.

## Verification

```bash
# Check launchd service
launchctl print gui/$(id -u)/com.steipete.openclaw.gateway | grep state

# Check config was generated
cat ~/.openclaw/openclaw.json | jq .gateway.mode
# Check remote transport config
cat ~/.openclaw/openclaw.json | jq '.gateway | { mode, remote }'
```

## Debug Logs
Expand Down Expand Up @@ -102,4 +108,4 @@ If the `device-pair` plugin is enabled:
- **openclaw-workspace** repo (`github:edmundmiller/openclaw-workspace`) `module/` — NUC gateway service module (moved from dotfiles)
- `hosts/nuc/default.nix` — NUC host-specific openclaw config (secrets, telegram, cron)
- `hosts/mactraitorpro/default.nix` — Enables with `apps.openclaw.enable = true`
- `hosts/shared/secrets/openclaw-gateway-token.age` — Auth token (agenix)
- `modules/shell/ssh.nix` — SSH target used by the macOS app for Remote over SSH

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 AGENTS.md references wrong SSH module path

The new line references modules/shell/ssh.nix as the file containing the SSH target, but this PR added the Host nuc SSH config to modules/services/ssh.nix (line 30-33). The file modules/shell/ssh.nix does exist but defines a different nuc host pointing to 192.168.1.222 (local IP) and is never enabled by any host. An agent following this AGENTS.md would be directed to the wrong, inactive module instead of the actual active SSH config at modules/services/ssh.nix.

Suggested change
- `modules/shell/ssh.nix` — SSH target used by the macOS app for Remote over SSH
- `modules/services/ssh.nix` — SSH target used by the macOS app for Remote over SSH
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

6 changes: 3 additions & 3 deletions modules/desktop/apps/openclaw/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ in
inputs.google-workspace-cli.packages.${pkgs.stdenv.hostPlatform.system}.default
];

# Force-overwrite openclaw.json so HM never tries to back it up.
# openclawInjectToken rewires this link target each rebuild; without
# force=true HM may try to move the existing path to .bkup and collide.
# Force-overwrite openclaw.json so Home Manager can replace a
# mutable config file if OpenClaw.app has written local changes.
home.file.".openclaw/openclaw.json".force = true;

programs.openclaw = {
Expand Down Expand Up @@ -82,6 +81,7 @@ in
ln -sfn "$_rendered" "$_config"
fi
'';

};
};
}
5 changes: 5 additions & 0 deletions modules/services/ssh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ in
Host *
IdentityAgent ${onePassPath}

Host nuc
HostName nuc.cinnamon-rooster.ts.net
User emiller
ForwardAgent yes

Host pubssh
HostName pubssh.utdallas.edu
User eam150030
Expand Down
6 changes: 3 additions & 3 deletions pi-packages/pi-qmd/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading