[PR #1] Fix Home Manager activation and gateway defaults #32

Open
opened 2026-02-15 17:04:39 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/openclaw/nix-openclaw/pull/1
Author: @manmal
Created: 1/3/2026
Status: 🔄 Open

Base: mainHead: fix/nix-hm-runtime


📝 Commits (7)

  • 4516b72 Fix home-manager runtime defaults
  • 9fba4aa Fix plugin env attribute check
  • 9ff6703 Avoid __MACOSX app bundle
  • 615ccd5 Merge origin/main
  • 4895f56 Bump Clawdis app to v2.0.0-beta5
  • 7444972 Fix Clawdis app beta5 hash
  • 41b86de Bump bundle metadata to v2.0.0-beta5

📊 Changes

5 files changed (+25 additions, -11 deletions)

View changed files

📝 docs/rfc/2026-01-02-declarative-clawdis-nix.md (+2 -3)
📝 nix/modules/home-manager/clawdis.nix (+17 -2)
📝 nix/packages/clawdis-app.nix (+4 -4)
📝 nix/packages/clawdis-batteries.nix (+1 -1)
📝 nix/packages/clawdis-gateway.nix (+1 -1)

📄 Description

Summary

  • fix string interpolation parse error in plugin assertion message
  • avoid nixpkgs alias conflict by renaming the gateway source argument
  • update gateway source + pnpm deps hash for v2.0.0-beta5
  • default the gateway wrapper to gateway-daemon when no args are passed
  • skip empty plugin state dir mkdir and write config JSON during activation
  • ensure app bundle extraction ignores __MACOSX and copies the real app
  • bump the Clawdis app zip + hash to v2.0.0-beta5
  • bump the batteries bundle name + RFC references to v2.0.0-beta5

Problems encountered during setup (and resolutions)

  1. Nix eval failed at the first home-manager switch

    • Stage: initial switch/evaluation
    • Symptom: error: syntax error, unexpected invalid token in clawdis.nix around a concatStringsSep call.
    • Root cause: the string used \", \" inside a double-quoted Nix string, which breaks parsing.
    • Fix: remove the escaping so Nix parses the message correctly.
  2. Nix eval failed with a src alias error

    • Stage: evaluation while calling the overlay
    • Symptom: The "src" package has been renamed to "simple-revision-control" from nixpkgs aliases.
    • Root cause: clawdis-gateway.nix took a function arg named src, which conflicts with nixpkgs’ src alias handling in overlays.
    • Fix: rename the argument to gatewaySrc and update the call site.
  3. Fixed-output hash mismatches (gateway + pnpm)

    • Stage: build phase after eval succeeded
    • Symptom: hash mismatch for Clawdis source, then pnpm deps.
    • Root cause: upstream release moved to v2.0.0-beta5 and the pnpm lock/deps hash changed.
    • Fix: update nix/sources/clawdis-source.nix and the pnpm deps hash in clawdis-gateway.nix.
  4. Home Manager activation failed when no plugins were enabled

    • Stage: activation (clawdisDirs)
    • Symptom: /bin/mkdir -p printed usage and aborted activation.
    • Root cause: an empty pluginStateDirs list produced a bare mkdir -p call.
    • Fix: guard the mkdir with a non-empty check.
  5. Gateway config file missing at runtime

    • Stage: runtime / first launch
    • Symptom: gateway started without the expected config JSON on disk.
    • Root cause: the config was only provided via home.file, not written during activation.
    • Fix: write clawdis.json in activation so the gateway sees it on startup.
  6. Clawdis app bundle extraction failed

    • Stage: app install
    • Symptom: Clawdis.app not found in the zip due to __MACOSX directory entries.
    • Root cause: find grabbed the resource fork path first.
    • Fix: skip __MACOSX when locating the app bundle.
  7. App zip hash mismatch after bumping to beta5

    • Stage: build phase after app version bump
    • Symptom: fixed-output hash mismatch for the beta5 zip.
    • Root cause: hash updated after prefetch (zip content differs from the guessed hash).
    • Fix: update the fetchzip hash to the correct value.
  8. Bundle metadata still labeled beta4

    • Stage: final build / packaging
    • Symptom: build output name still clawdis-2.0.0-beta4 even though app+gateway were beta5.
    • Root cause: clawdis-batteries.nix name and RFC notes were not bumped.
    • Fix: update bundle name and RFC references to beta5.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/openclaw/nix-openclaw/pull/1 **Author:** [@manmal](https://github.com/manmal) **Created:** 1/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/nix-hm-runtime` --- ### 📝 Commits (7) - [`4516b72`](https://github.com/openclaw/nix-openclaw/commit/4516b72b2d167bb501a550ee8980fecf83313515) Fix home-manager runtime defaults - [`9fba4aa`](https://github.com/openclaw/nix-openclaw/commit/9fba4aafccf501cc7901d3d17d68cb17a68fd919) Fix plugin env attribute check - [`9ff6703`](https://github.com/openclaw/nix-openclaw/commit/9ff6703de4dc49c8c20819dbb7d6b0681c6e189c) Avoid __MACOSX app bundle - [`615ccd5`](https://github.com/openclaw/nix-openclaw/commit/615ccd53c015b0552c6040bd6d057c54de21748d) Merge origin/main - [`4895f56`](https://github.com/openclaw/nix-openclaw/commit/4895f560fc7907a2ee12b69ec8b804b532c27c9d) Bump Clawdis app to v2.0.0-beta5 - [`7444972`](https://github.com/openclaw/nix-openclaw/commit/7444972cd0ca9b0ba01c4eeb86d5db7f1858c8b2) Fix Clawdis app beta5 hash - [`41b86de`](https://github.com/openclaw/nix-openclaw/commit/41b86dececf0c373d47aa4acdc1a4751c13a16f5) Bump bundle metadata to v2.0.0-beta5 ### 📊 Changes **5 files changed** (+25 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `docs/rfc/2026-01-02-declarative-clawdis-nix.md` (+2 -3) 📝 `nix/modules/home-manager/clawdis.nix` (+17 -2) 📝 `nix/packages/clawdis-app.nix` (+4 -4) 📝 `nix/packages/clawdis-batteries.nix` (+1 -1) 📝 `nix/packages/clawdis-gateway.nix` (+1 -1) </details> ### 📄 Description ## Summary - fix string interpolation parse error in plugin assertion message - avoid nixpkgs alias conflict by renaming the gateway source argument - update gateway source + pnpm deps hash for v2.0.0-beta5 - default the gateway wrapper to `gateway-daemon` when no args are passed - skip empty plugin state dir mkdir and write config JSON during activation - ensure app bundle extraction ignores `__MACOSX` and copies the real app - bump the Clawdis app zip + hash to v2.0.0-beta5 - bump the batteries bundle name + RFC references to v2.0.0-beta5 ## Problems encountered during setup (and resolutions) 1) **Nix eval failed at the first `home-manager switch`** - **Stage:** initial switch/evaluation - **Symptom:** `error: syntax error, unexpected invalid token` in `clawdis.nix` around a `concatStringsSep` call. - **Root cause:** the string used `\", \"` inside a double-quoted Nix string, which breaks parsing. - **Fix:** remove the escaping so Nix parses the message correctly. 2) **Nix eval failed with a `src` alias error** - **Stage:** evaluation while calling the overlay - **Symptom:** `The "src" package has been renamed to "simple-revision-control"` from nixpkgs aliases. - **Root cause:** `clawdis-gateway.nix` took a function arg named `src`, which conflicts with nixpkgs’ `src` alias handling in overlays. - **Fix:** rename the argument to `gatewaySrc` and update the call site. 3) **Fixed-output hash mismatches (gateway + pnpm)** - **Stage:** build phase after eval succeeded - **Symptom:** hash mismatch for Clawdis source, then pnpm deps. - **Root cause:** upstream release moved to v2.0.0-beta5 and the pnpm lock/deps hash changed. - **Fix:** update `nix/sources/clawdis-source.nix` and the pnpm deps hash in `clawdis-gateway.nix`. 4) **Home Manager activation failed when no plugins were enabled** - **Stage:** activation (`clawdisDirs`) - **Symptom:** `/bin/mkdir -p` printed usage and aborted activation. - **Root cause:** an empty `pluginStateDirs` list produced a bare `mkdir -p` call. - **Fix:** guard the mkdir with a non-empty check. 5) **Gateway config file missing at runtime** - **Stage:** runtime / first launch - **Symptom:** gateway started without the expected config JSON on disk. - **Root cause:** the config was only provided via `home.file`, not written during activation. - **Fix:** write `clawdis.json` in activation so the gateway sees it on startup. 6) **Clawdis app bundle extraction failed** - **Stage:** app install - **Symptom:** `Clawdis.app` not found in the zip due to `__MACOSX` directory entries. - **Root cause:** `find` grabbed the resource fork path first. - **Fix:** skip `__MACOSX` when locating the app bundle. 7) **App zip hash mismatch after bumping to beta5** - **Stage:** build phase after app version bump - **Symptom:** fixed-output hash mismatch for the beta5 zip. - **Root cause:** hash updated after prefetch (zip content differs from the guessed hash). - **Fix:** update the `fetchzip` hash to the correct value. 8) **Bundle metadata still labeled beta4** - **Stage:** final build / packaging - **Symptom:** build output name still `clawdis-2.0.0-beta4` even though app+gateway were beta5. - **Root cause:** `clawdis-batteries.nix` name and RFC notes were not bumped. - **Fix:** update bundle name and RFC references to beta5. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 17:04:39 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/nix-openclaw#32