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.
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.
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.