Commit Graph
1 Commits
Author SHA1 Message Date
Willem van den Ende 2bf149a2e8 refactor(init): give init.el one owner per machine
Doom's `doom!' takes a single module list, so this file cannot be shared:
the two machines want different module sets (vertico + popup + workspaces
here, ivy + dashboard + doom-quit there), and the mac list still carries
pre-3.0 names that this Doom rejects.  Instead of merging 143 lines of it,
each machine keeps its own copy:

  linux/init.el   from linux-adopt, verbatim (cmp: identical)
  mac/init.el     the previous root init.el, verbatim (cmp: identical)

The root init.el is now an *untracked* symlink into whichever directory
matches the machine, created by bin/link-machine.sh.  It has to be
untracked: one branch is shared by both machines, and a tracked symlink can
only have one target.  /init.el is gitignored so a stray link can never be
committed and clobber the other machine.

Verified:
  - link resolves: file-truename init.el -> .../linux/init.el
  - the file parses (check-parens) through the link
  - sh -n clean; unknown-machine path exits 1 with a message
  - git status clean apart from this commit (symlink is ignored)

On the mac, after pulling: ./bin/link-machine.sh && doom sync

Caveats, all consequences of the link being untracked:
  - a fresh clone has no init.el until you run the script
  - `git clean -xfd' deletes it; re-run the script
  - Emacs' byte-compiler would write init.elc next to the link (repo root);
    harmless here since *.elc is ignored and the target's mtime wins when
    the .el has been edited

config.el and packages.el stay shared at the root for now: their content is
mostly common, and three-way merges are worth more there than isolation.
That is also why AGENTS.md, snippets/ and qwan/ stay where they are.
2026-11-03 13:13:26 +00:00