Skip to content

[NO-JIRA] Restart gclpr-server on home-switch when trusted keys change - #1076

Merged
johnnymo87 merged 1 commit into
mainfrom
gclpr-restart-on-trusted-change
Dec 2, 2026
Merged

johnnymo87 merged 1 commit into
mainfrom
gclpr-restart-on-trusted-change

Conversation

@johnnymo87

Copy link
Copy Markdown
Owner

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 Rotate gclpr keypair and clean up plan doc placeholder #1057, [NO-JIRA] Give devbox its own gclpr keypair #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

@johnnymo87
johnnymo87 merged commit 20edd3d into main Dec 2, 2026
2 checks passed
@johnnymo87
johnnymo87 deleted the gclpr-restart-on-trusted-change branch December 2, 2026 22:33
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