claude-code: Add support for installing plugins (#8934)

Allow for configuring marketplaces or individual plugins.

Both are provided as a list of either paths or packages.

The lone plugins are enabled by adding a --plugin-dir argument to the wrapper script.

Marketplaces are saved to the nix store and enabled by adding to the claude settings and known_marketplaces files.

With the marketplace "installed", the plugin can just be enabled via the enabledPlugins setting.
This commit is contained in:
Pat L. 2026-03-26 23:59:48 -04:00 committed by GitHub
parent 0143d6ca9b
commit 7126ec6a55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 196 additions and 6 deletions

View file

@ -47,7 +47,7 @@
};
test.asserts.assertions.expected = [
"`programs.claude-code.package` cannot be null when `mcpServers`, `lspServers`, or `enableMcpIntegration` is configured"
"`programs.claude-code.package` cannot be null when `mcpServers`, `lspServers`, `enableMcpIntegration`, or `plugins` is configured"
"Cannot specify both `programs.claude-code.memory.text` and `programs.claude-code.memory.source`"
"Cannot specify both `programs.claude-code.agents` and `programs.claude-code.agentsDir`"
"Cannot specify both `programs.claude-code.commands` and `programs.claude-code.commandsDir`"