programs.claude-code.hooks

Custom hooks for Claude Code. The attribute name becomes the hook filename, and the value is the hook script content. Hooks are stored in .claude/hooks/ directory.

Type
attribute set of strings concatenated with "\n"
Default
{ }
Example
{
  post-commit = ''
    #!/usr/bin/env bash
    echo "Committed with message: $1"
  '';
  pre-edit = ''
    #!/usr/bin/env bash
    echo "About to edit file: $1"
  '';
}
Declared
<home-manager/modules/programs/claude-code.nix>