11 Commits

Author SHA1 Message Date
Drew Davis
6dfd606ede claude-code: respect preferXdgDirectories 2026-10-19 21:12:05 -05:00
Austin Horstman
9a04ebebeb claude-code: add opt-in mutable settings
Keep user settings and marketplace registrations writable while applying
declared values. Seed required marketplace metadata only where missing,
preserving saved timestamps and update flags. Retain the immutable
default.
2026-10-04 20:17:31 -05:00
Austin Horstman
9bb0782f16 claude-code: warn that MCP server values are world-readable
Values in mcpServers are serialized into a generated plugin in the
world-readable Nix store, and the example put database credentials in a
DSN and an environment variable. Remove the credentials from the example
and point local servers at the file-backed programs.mcp.servers
environment values.
2026-09-25 13:01:17 -05:00
George Huebner
9f56e690e4 claude-code: disable automatic updates for managed marketplaces 2026-08-23 21:58:07 -05:00
Austin Horstman
fa4717d13d claude-code: avoid IFD for skill paths
Classify derived skill files and directories during the build instead of inspecting them during evaluation.
2026-08-16 19:46:12 -05:00
Zexin Yuan
367f7ef808 claude-code: shorten generated plugin name to "hm"
The synthesized plugin that delivers managed MCP and LSP configuration to
Claude Code was named `claude-code-home-manager`. Claude Code derives the
MCP tool namespace from the plugin manifest (`plugin.json`), so that name
appeared in the prefix of every plugin-loaded MCP tool
(`mcp__plugin_<name>_<server>__<tool>`), adding 22 characters of overhead per
tool name.

Shorten the manifest name to `hm`, centralizing it in a `generatedPluginName`
binding, so tool prefixes become `mcp__plugin_hm_<server>__<tool>`. The
personal-plugin directory entry keeps the stable `claude-code-home-manager`
name (the path under `~/.claude/skills/`); a short name there would collide
with valid `programs.claude-code.plugins.hm` or `skills.hm` and fail the
uniqueness assertions.

This is a breaking change: users who allow or deny these tools by name in
their settings must update references from `claude-code-home-manager` to
`hm`. A news entry documents the migration.

Closes #9446

Assisted-by: Claude-Code:GLM-5.2
2026-08-09 09:45:33 -05:00
Vidhan Bhatt
cc51f24b9b claude-code: allow hooks to accept a path like skills/commands
programs.claude-code.hooks previously only accepted inline strings.
It now shares the same either-lines-or-path content option used by
agents, commands, and rules, so a hook script can be referenced from
a file instead of being inlined.

mkSourceEntry used lib.isPath, which does not match derivations such
as pkgs.writeShellScript. Since lib.types.path accepts derivations,
a derivation-backed hook (or agent, command, rule, or output style)
sent the derivation to home.file.*.text and failed evaluation. Use
lib.hm.strings.isPathLike instead, and add a derivation-backed hook
test.

No release-notes entry: other option additions/extensions to this
module (e.g. path support for agents/commands, the rules option
itself) haven't warranted one either.
2026-08-05 14:33:00 -05:00
jiezhuzzz
cbb77679b3 claude-code: link plugins so agents and commands load
Claude Code lists a plugin's `agents/` and `commands/` entries with a
`readdir` that accepts only regular files, so symlinked directory entries
are skipped. Managed plugins were linked recursively, which materializes a
real directory holding one symlink per file, and wrapped with
`pkgs.symlinkJoin`, which mirrors directories and symlinks the leaf files.
Both layers dropped every agent and command a plugin provides.

Link each plugin as a single directory symlink, and wrap it with a
`runCommand` that links only top-level entries so component directories stay
symlinks to the original.

Also accept an attribute set for `plugins`, making the personal-plugin
directory name user-controlled and stable rather than derived from the
source's base name, which yields names such as `bxa1s0m3h4sh-source` that
change whenever the plugin is updated. The list form keeps working, with a
warning.
2026-07-27 11:11:02 -05:00
Dimaniojk
56ccab8918 programs.claude-code: avoid watching the Nix store 2026-07-21 00:19:38 +02:00
Austin Horstman
f938277527 claude-code: tighten module implementation
Remove redundant option machinery, centralize skills shape checks, and use narrower list composition while preserving generated behavior.
2026-07-10 14:19:11 -05:00
Austin Horstman
5c7199cd3b claude-code: split module files
Move public option declarations and file-entry helpers into dedicated files while keeping module assembly in default.nix. Update the AI labeler for the new module directory.
2026-07-10 14:19:11 -05:00