Repository navigation
Commit 28d54f9
authored
refactor(nix): split out the git wt module and auto-install JS deps on shell entry (#1543)
* refactor(nix): extract the git wt wiring into its own module
The dev shell's shellHook mixed three unrelated concerns: mold linker
flags, agent-skill syncing, and the `git wt` repo config. Move the last
one to nix/git-wt.nix, matching the layout rorkai/rork-local already
uses, so the two repositories can stay in sync and the dev shell reads
as a list of concerns rather than a script.
The module takes the worktree install command as an argument, defaulting
to `just install`, which is what this repository needs. The expanded
shellHook is byte-identical to before.
* feat(nix): install JS dependencies on dev shell entry
Entering the dev shell after a `git pull` that bumped a lockfile left a
stale node_modules until someone remembered to run `just install`, which
usually surfaced as a confusing type or resolution error rather than as a
missing dependency.
Gate the install on a stamp file instead of on the node_modules mtimes:
an install that changes nothing leaves those directories untouched, so
comparing against the tree itself would re-install on every shell entry.
`just install` writes the stamp, which also means the `git wt` worktree
hook already satisfies the check and a fresh worktree does not install
twice.
The check covers the tool lockfiles under nix/tools as well, since those
directories sit outside the pnpm workspace and `.envrc` already watches
the whole nix/ tree.1 parent aa8c7b1 commit 28d54f9
3 files changed
Lines changed: 52 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
85 | | - | |
86 | 85 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
94 | 106 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
98 | 111 | | |
99 | 112 | | |
100 | 113 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments