Skip to content

feat(peon-ping): add peon-ping package and home-manager module#49

Merged
jonpulsifer merged 1 commit intomainfrom
claude/hopeful-bartik
Feb 21, 2026
Merged

feat(peon-ping): add peon-ping package and home-manager module#49
jonpulsifer merged 1 commit intomainfrom
claude/hopeful-bartik

Conversation

@jonpulsifer
Copy link
Owner

@jonpulsifer jonpulsifer commented Feb 21, 2026

Summary

Vendor peon-ping v2.8.1 and an adapted home-manager module (from nix-community/home-manager#8750) so it can be used before the upstream PRs are merged. Includes cross-platform support (macOS + Linux), Claude Code hooks integration, and Gemini CLI adapter hooks.

Changes

  • pkgs/peon-ping.nix — Local package derivation for peon-ping v2.8.1 with macOS support (libnotify conditional on Linux), installs adapters/scripts/skills
  • home/modules/peon-ping.nix — Home-manager module adapted from upstream PR: pack installation (as real files, not symlinks, to avoid realpath security check), Claude Code + Gemini CLI hook integration via activation scripts, mutable config seeding
  • flake.nix — Added peon-ping to overlay
  • home/home.nix + home/work.nix — Import module, enable with Claude Code + Gemini integration
  • home/modules/gcloud.nix — Fix pre-existing syntax error (stray w prefix)
  • home/modules/ai/default.nix — Formatting only (linter)

Test Plan

  • nix build .#legacyPackages.aarch64-darwin.peon-ping — package builds on macOS
  • peon help — binary runs correctly
  • nix build .#default --dry-run — work config evaluates
  • nix build .#homebook --dry-run — homebook config evaluates
  • nix eval .#packages.x86_64-linux.default --apply 'x: "ok"' — Linux config evaluates

🤖 Generated with Claude Code


Note

Medium Risk
Introduces new activation scripts that mutate local tool config files (~/.claude/settings.json, Gemini settings) and manage on-disk assets, which could override user changes or break agent hook behavior if misconfigured.

Overview
Vendors peon-ping v2.8.1 as a new Nix package and exposes it via the flake overlay so it can be installed cross-platform.

Adds a Home Manager module (programs.peon-ping) that installs sound packs into ~/.claude/hooks/peon-ping, optionally seeds a mutable default config, and can automatically merge hook configurations into Claude Code and Gemini CLI settings via activation scripts; the module is imported and enabled in home.nix and work.nix.

Also fixes a small syntax issue in modules/gcloud.nix and applies formatting-only changes in modules/ai/default.nix.

Written by Cursor Bugbot for commit 31bdd42. This will update automatically on new commits. Configure here.

Vendor peon-ping v2.8.1 package and an adapted home-manager module
(from nix-community/home-manager#8750) so it can be used before the
upstream PRs are merged.

Package (pkgs/peon-ping.nix):
- Cross-platform support (macOS + Linux) — libnotify conditional on Linux
- Installs adapters, scripts, and skills alongside the main peon.sh
- Shell completions for bash and fish

Module (home/modules/peon-ping.nix):
- programs.peon-ping.enable installs package and sound packs
- Copies packs as real files (not symlinks) to avoid peon's realpath
  path-traversal check rejecting nix store paths
- Symlinks peon.sh and adapters/ into hooks dir for IDE detection
- enableClaudeCodeIntegration merges hooks into settings.json
- enableGeminiIntegration merges adapter hooks into ~/.gemini/settings.json
- Seeds mutable default config on first activation

Also fixes pre-existing syntax error in gcloud.nix (stray 'w' prefix).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jonathan Pulsifer <jonathan@moonpay.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on March 12

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

${pkgs.jq}/bin/jq --argjson peon "$PEON_HOOKS" '
.hooks as $existing |
reduce ($peon | keys[]) as $event (.; .hooks[$event] = (($existing[$event] // []) + $peon[$event]))
' "$CLAUDE_SETTINGS" > "$CLAUDE_SETTINGS.tmp" && mv "$CLAUDE_SETTINGS.tmp" "$CLAUDE_SETTINGS"
Copy link

Choose a reason for hiding this comment

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

Claude Code hooks duplicate on every activation

High Severity

The claudeCodePeonPingHooks activation script appends peon-ping hooks to .hooks[$event] on every run without checking whether they already exist. Each home-manager switch will add another duplicate copy of every peon-ping hook entry, causing the settings.json hooks arrays to grow unboundedly. The jq reduce expression concatenates $existing[$event] (which already includes peon hooks from prior runs) with $peon[$event] again.

Fix in Cursor Fix in Web

home.activation.geminiPeonPingHooks = lib.mkIf cfg.enableGeminiIntegration (
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
GEMINI_SETTINGS="''${GEMINI_CONFIG_DIR:-$HOME/.gemini}/settings.json"
ADAPTER="$HOME/.claude/hooks/peon-ping/adapters/gemini.sh"
Copy link

Choose a reason for hiding this comment

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

Gemini adapter path ignores CLAUDE_CONFIG_DIR variable

Medium Severity

The ADAPTER path in the Gemini hooks activation is hardcoded to $HOME/.claude/hooks/peon-ping/adapters/gemini.sh, but the installPeonPingPacks activation installs adapters under ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hooks/peon-ping/adapters/. When CLAUDE_CONFIG_DIR is set to a non-default path, the Gemini hooks will reference a non-existent adapter location.

Additional Locations (1)

Fix in Cursor Fix in Web


if [ -f "$GEMINI_SETTINGS" ]; then
${pkgs.jq}/bin/jq --argjson peon "$GEMINI_HOOKS" '.hooks = $peon' \
"$GEMINI_SETTINGS" > "$GEMINI_SETTINGS.tmp" && mv "$GEMINI_SETTINGS.tmp" "$GEMINI_SETTINGS"
Copy link

Choose a reason for hiding this comment

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

Gemini hooks overwrite all existing user hooks

Medium Severity

The Gemini hooks activation uses .hooks = $peon which replaces the entire hooks object in the Gemini settings file, clobbering any pre-existing non-peon hooks the user may have configured. The comment says "Merge peon-ping hooks into Gemini CLI settings.json" but the implementation performs a full replacement rather than a merge.

Fix in Cursor Fix in Web

@jonpulsifer jonpulsifer merged commit 4f04f13 into main Feb 21, 2026
7 checks passed
@jonpulsifer jonpulsifer deleted the claude/hopeful-bartik branch February 25, 2026 04:19
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