This repo is built to hold every machine’s configuration—personal and work,
macOS and Linux—without splitting into multiple copies. Platform‑specific
files live under darwin/ so non‑macOS hosts naturally skip them.
Private work hosts can layer their own dotfiles tree via WORK_DOTFILES_ROOT,
using the exact same directory shape, so “personal base + work overlay” stays
easy to reason about.
Symlinks are created by a small tool (dotlink) to make link targets
deterministic, reversible, and safe to re‑run.
Design rules:
- Shared defaults stay at the repo root; macOS‑only lives in
darwin/. - Overlays follow the same layout and override by path, highest‑priority win.
- Bootstrap must be idempotent: re‑running
dotsetup/dotlinkshould be safe.
bin/dotlink materializes symlinks from this repo (and optional work overlay)
into your home:
link- create/update symlinks (backs up existing real files under.backup/<ts>/).unlink- remove current symlinks created by dotlink.status- report OK/MISS/DIFF/FILE for expected links.prune- remove broken symlinks that pointed into dotfiles/work-dotfiles.
Priority when choosing a source (first match wins):
WORK_DOTFILES_ROOT/darwin/...(macOS &&bin/is-worktrue)WORK_DOTFILES_ROOT/...DOTFILES_ROOT/darwin/...(macOS)DOTFILES_ROOT/...
link wires:
$XDG_CONFIG_HOME/<name>←.config/<name>(ordarwin/.config/<name>on macOS)$HOME/.zshenv←.config/zsh/.zshenv$LOCAL_BIN/<name>←bin/<name>(plusdarwin/bin/<name>on macOS)
bin/dotsetup clones/updates the repo, runs dotlink link, and optionally
installs Rust toolchains and listed Cargo binaries. Environment flags:
DOTSETUP_SKIP_RUST=1DOTSETUP_SKIP_CARGO=1
Note: dotsetup is still evolving; missing pieces will be filled as the setup surface grows.
- This repo’s history may be rewritten and force‑pushed; rebase locally before pushing.
- macOS‑only pieces live under
darwin/; Linux hosts will ignore them. - Work overlay (
WORK_DOTFILES_ROOT) is optional but, when present, overrides personal files per the priority above.