programs.claude-code.hooks
Home-Manager option
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
declared in: <home-manager/modules/programs/claude-code.nix>source unavailable{ post-commit = '' #!/usr/bin/env bash echo "Committed with message: $1" ''; pre-edit = '' #!/usr/bin/env bash echo "About to edit file: $1" ''; }