Allow path-backed hook bundles to provide both hooks.json and supporting scripts through programs.codex.hooks.
17 lines
400 B
Nix
17 lines
400 B
Nix
{
|
|
programs.codex = {
|
|
enable = true;
|
|
hooks = ./hooks-dir;
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.codex/hooks.json
|
|
assertFileContent home-files/.codex/hooks.json \
|
|
${./hooks-dir/hooks.json}
|
|
|
|
assertFileExists home-files/.codex/hooks/session-start.sh
|
|
assertFileContent home-files/.codex/hooks/session-start.sh \
|
|
${./hooks-dir/session-start.sh}
|
|
'';
|
|
}
|