Skip to content

[NO-JIRA] Give devbox its own gclpr keypair - #1060

Merged
johnnymo87 merged 2 commits into
mainfrom
gclpr-devbox-key
Dec 1, 2026
Merged

johnnymo87 merged 2 commits into
mainfrom
gclpr-devbox-key

Conversation

@johnnymo87

Copy link
Copy Markdown
Owner

Description

  • devbox now has its own gclpr clipboard-bridge keypair instead of sharing cloudbox's.
  • assets/gclpr/devbox.pub is deployed as ~/.gclpr/key.pub on devbox; other NixOS hosts keep assets/gclpr/key.pub.
  • secrets/devbox.yaml: gclpr_private_key holds the matching private key (base64, same encoding as before).
  • The Mac's ~/.gclpr/trusted (users/dev/home.darwin.nix) lists both hosts' public keys, one per line with # comments (gclpr reads multiple keys and skips comments).
  • Clipboard skill documents the per-host layout and the apply order.

Apply order: on devbox nixos-rebuild switch (refreshes /run/secrets), then the home-manager switch (copies it into ~/.gclpr/key); on the Mac home-switch.

Verified: the private key in secrets/devbox.yaml matches devbox.pub, every other devbox secret decrypts unchanged, check-sops-encrypted passes, gitleaks finds nothing, and nix eval shows the right key.pub for each host and the Mac's trusted text.

devbox now has a dedicated gclpr clipboard-bridge keypair instead of
sharing one with cloudbox:

- assets/gclpr/devbox.pub: devbox's public key, deployed as
  ~/.gclpr/key.pub on devbox (other NixOS hosts keep key.pub).
- secrets/devbox.yaml: gclpr_private_key replaced with the matching
  private key (base64, same encoding as before).
- home.darwin.nix: the Mac's ~/.gclpr/trusted lists both the cloudbox
  and devbox public keys, one per line with comments.
- clipboard skill: documents the per-host keypair layout.
@johnnymo87
johnnymo87 enabled auto-merge (squash) December 1, 2026 18:38
@johnnymo87
johnnymo87 merged commit 8411760 into main Dec 1, 2026
2 checks passed
@johnnymo87
johnnymo87 deleted the gclpr-devbox-key branch December 1, 2026 18:57
johnnymo87 added a commit that referenced this pull request Dec 2, 2026
#1076)

#### Description

- `gclpr server` on macOS reads `~/.gclpr/trusted` only at startup and
rejects unrecognized client keys by closing the connection (`*** ERROR:
unexpected EOF`), so rotating/splitting host keys (PRs #1057, #1060)
left clipboard copy/paste broken after `home-switch` because the
`gclpr-server` launchd plist had not changed.
- Bound the trusted-keys text once in `users/dev/home.darwin.nix`
(`gclprTrusted`) and hashed it into
`launchd.agents.gclpr-server.config.EnvironmentVariables.GCLPR_TRUSTED_SHA256`.
When `~/.gclpr/trusted` changes, `linkGeneration` updates the symlink
first and `setupLaunchAgents` sees the plist diff and runs
`bootout`/`bootstrap` automatically; unrelated switches leave the plist
unchanged and do not restart `gclpr-server`.
- Updated `.agents/skills/clipboard/SKILL.md` to document the automatic
restart on `home-switch`, the `*** ERROR: unexpected EOF` stale-server
symptom, and `od -An -tx1` in place of `xxd` (not installed on NixOS
hosts).

#### Verification

- Built `homeConfigurations."Y0FMQX93RR-2".activationPackage` and
verified the generated `org.nix-community.home.gclpr-server.plist`
differs only by `GCLPR_TRUSTED_SHA256` matching `shasum -a 256
~/.gclpr/trusted`, and `.gclpr/trusted` content is byte-for-byte
unchanged.
- Verified `gclpr server` starts cleanly and loads both trusted keys
with `GCLPR_TRUSTED_SHA256` set.
- `bash users/dev/test-pipefail-inversion.sh` and `bash
users/dev/test-frontdoor-opacity.sh`: pass.

#### References

- Follow-up to #1057 and #1060
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