Repository navigation
Conversation
./setup saves a per-machine tool list and chezmoi links only that closure. The Stow packages stay in the repo for machines that still call stow directly. Co-authored-by: drewjsdev <drewjsdev@pm.me>
ReviewBug: empty TSV columns collapse (
|
Bash read treats tab as whitespace and drops empty fields, so a dependency was passed to brew as a cask. Co-authored-by: drewjsdev <drewjsdev@pm.me>
Stow skips .gitignore and a few VCS names. Requiring those links made a full apply fail after the packages were installed. Co-authored-by: drewjsdev <drewjsdev@pm.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A fresh Mac should install the tools that machine needs, and only those, without a second copy of the Stow tree.
./setupasks once, saves the choice in~/.config/dotfiles/tools, and runs chezmoi. The apply script template reads that file and links the matching Stow packages. A second run with the same choice leaves those links and already-installed formulae alone.Add a tool by appending one row to
tools.tsv.What changed
tools.tsvis the list of installable tools, their Homebrew packages, and dependencies../setupis the one command. Chezmoi applies the saved list.Scope
This covers a fresh Mac and a remembered subset.
stow <tool>from the repo root still works. Existing package directories stay in the repo.Tradeoffs
A plain manifest script as the installer was rejected. Chezmoi has to be the thing that applies the choice.
Nix was rejected. It would replace the Stow layout.
Copying every config into chezmoi
dot_files was rejected. A new file would need its own template guard, andstow <tool>would no longer be the same tree.Blast radius
These are the behaviors that remove or overwrite a config Andrew already has.
~/.local/share/dotfiles/backups/<timestamp>/and links the repo file in its place. The old bytes are the backup. The old path now points at the repo.~/.configis a symlink, setup moves that symlink into the same backup directory and creates a real directory. When the symlink pointed at a package in this repo, setup links that package again so its files stay available.~/.zprofile. If~/.zprofilealready exists, setup copies it into the backup directory first.A rerun that names fewer tools leaves the earlier links where they are. Formulae that are already installed stay at the installed version. setup does not start yabai or skhd, and it does not write
~/.zshrc.local.Verification
./lib/dotfiles.sh self-testpassed on Linux. It checked a starship-only link, rejection of other packages, an idempotent second apply, a backup before replace, preservation of a folded~/.configsymlink, and./setupthrough chezmoi.setuponmacos-latestpassed in https://github.com/drewjs/dotfiles/actions/runs/39075354540. shellcheck, subset, and full are green. The subset job checked that unselected tools stayed absent. The full and subset jobs each ran setup a second time and the snapshot diff was empty.