mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-02 19:49:18 +00:00
Write path-backed hook bundles only under the active Codex home so XDG mode no longer mirrors scripts into ~/.codex.
21 lines
526 B
Nix
21 lines
526 B
Nix
{
|
|
home.preferXdgDirectories = true;
|
|
|
|
programs.codex = {
|
|
enable = true;
|
|
hooks = ./hooks-dir-xdg;
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/codex/hooks.json
|
|
assertFileContent home-files/.config/codex/hooks.json \
|
|
${./hooks-dir-xdg/hooks.json}
|
|
|
|
assertFileExists home-files/.config/codex/hooks/session-start.sh
|
|
assertFileContent home-files/.config/codex/hooks/session-start.sh \
|
|
${./hooks-dir-xdg/session-start.sh}
|
|
|
|
assertPathNotExists home-files/.codex/hooks
|
|
'';
|
|
}
|