refactor(modules): relocate lib/modules/home out of the misleading "home" name #778
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "relocate-home-modules"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
lib/modules/home/was documented as dead home-manager leftovers — but nothing in it is dead, it's only mis-named. It held exactly two live things:claude/— the source of the global~/.claude/CLAUDE.md, the claude hook/notify/statusline bash, andcommands/. Read at eval time bylib/modules/nixos/claude.nix, symlinked by it +opencode.nix.scripts/— 84 personal scripts (common/+linux/) bundled onto$PATHviabuildEnvinlib/modules/shared/shell-config.nix, imported by both the nixos and darwin module sets.The
homename is a fossil of the removed home-manager setup, and it made agents (and the AGENTS.md "dead code, do not edit" note) treat live, load-bearing files as untouchable — including your own global agent instructions.Moves
lib/modules/home/claude/dotfiles/agents/claude/lib/modules/home/scripts/{common,linux}lib/scripts/{common,linux}dotfiles/agents/is deliberately harness-agnostic (claude-specific bits nested underclaude/), and putting the agent config underdotfiles/matches the repo convention — content symlinked into~, editable without a rebuild.Rewiring
Every reference updated:
claude.nix(eval-timereadFile+devScriptsPathdefault + two userSymlink targets),opencode.nix(AGENTS.md symlink),shell-config.nix(bothbuildEnvpaths). Removed the already-deadreadme.md"Home Manager Modules" link (lib/modules/home/default.nixhasn't existed for some time).Pure move + rewiring, no content changes (jj collapses it to renames: 7 insertions / 8 deletions).
Verification
readFileof the moved claude scripts, so a wrong path would fail the eval.CLAUDE.md,commands/speak.md) exist at their new paths.Relationship to the other PRs
The AGENTS.md cleanup that finally deletes the "dead code" note lives on the docs-reconcile branch (#775), rebased on top of this. Recommend merging this first, then #775.
lib/modules/home/ was documented as dead home-manager leftovers, but nothing in it is dead — it is only MIS-NAMED. It held exactly two live things: - claude/ — the source of the global ~/.claude/CLAUDE.md, the claude hook/ notify/statusline bash, and the commands/. Read at eval time by lib/modules/nixos/claude.nix and symlinked by it + opencode.nix. - scripts/ — 84 personal scripts (common/ + linux/) bundled onto PATH via buildEnv in lib/modules/shared/shell-config.nix, imported by both the nixos and darwin module sets. The "home" name is a fossil of the removed home-manager setup and made agents (and the AGENTS.md "dead code, do not edit" note) treat live, load-bearing files as untouchable. Move them where they belong and the note can simply be deleted: - claude/ -> dotfiles/agents/claude/ (harness-agnostic dotfiles/agents/ with the claude-specific bits under claude/; matches the repo dotfiles convention — content symlinked into home, editable without rebuild) - scripts/ -> lib/scripts/{common,linux} Rewired every reference: claude.nix (eval-time readFile + devScriptsPath default + two userSymlink targets), opencode.nix (AGENTS.md symlink), shell-config.nix (both buildEnv paths). Removed the already-dead readme.md "Home Manager Modules" link (lib/modules/home/default.nix has not existed for some time). Pure move + rewiring, no content changes. Verified: the whole dragon host config evaluates (which forces the eval-time readFile of the moved claude scripts), and both moved symlink targets exist at their new paths. The AGENTS.md doc cleanup that drops the "dead code" note rides on the docs- reconcile branch (#775), rebased on top of this.