Skip to content

Adds extensible Claude plugin options#254

Open
crdant wants to merge 5 commits intomainfrom
feature/crdant/extensible-claude-plugins
Open

Adds extensible Claude plugin options#254
crdant wants to merge 5 commits intomainfrom
feature/crdant/extensible-claude-plugins

Conversation

@crdant
Copy link
Copy Markdown
Owner

@crdant crdant commented Mar 26, 2026

TL;DR

Introduces a custom programs.claude.plugins home-manager option so any module can declare its Claude Code plugins, and hardens the activation script along the way.

Details

Defines programs.claude.plugins as a listOf str option in the AI module with base plugins as defaults. Leverages the NixOS module system's automatic list merging — the same mechanism behind home.packages and programs.neovim.plugins — so language modules contribute plugins alongside their other tooling.

Hardens the activation script with lib.escapeShellArg for all Nix-to-bash interpolations and jq --arg for filter parameters. Replaces the fragile install/update branching with always-install since the CLI is idempotent, fixing scope mismatch errors when project-scoped plugins exist (e.g. strategy@shortrib-labs failing update because it was installed at project scope). Adds the missing entryAfter dependency on the claude activation step.

Keeps marketplaces centralized in the AI module because attrsOf str does not merge duplicate keys, even with identical values.

Moves gopls-lsp to the Go module and compound-engineering to the development module as proof of concept. Remaining language-specific LSP plugins stay as AI module defaults until their modules adopt the pattern.

🤖 Generated with Claude Code

crdant and others added 5 commits March 26, 2026 12:52
Addresses shell injection risk by using lib.escapeShellArg for all
Nix-to-bash interpolations and jq --arg for filter parameters.
Replaces install/update branching with always-install since the CLI
is idempotent, fixing scope mismatch errors when project-scoped
plugins exist. Adds missing entryAfter dependency on the claude
activation step.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces programs.claude.plugins as a custom home-manager option so
language modules can declare their Claude Code plugins alongside their
other tooling. The NixOS module system merges lists from all modules
automatically. Marketplaces stay centralized in the AI module since
attrsOf str does not merge duplicate keys. Consolidates the duplicate
programs blocks and removes the now-inlined config/plugins.nix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Demonstrates cross-module plugin contribution by declaring the Go LSP
plugin alongside Go's other tooling in the Go module. Retains the
remaining language-specific LSP plugins (pyright, swift, typescript)
as AI module defaults until their respective modules adopt the pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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