Repository navigation
Conversation
setup installs and links only the tools chosen for this Mac, remembers that choice, and copies aside any path it has to replace. Co-authored-by: drewjsdev <drewjsdev@pm.me>
Run shellcheck, a full install, a subset install, a second run, and a check that unselected tools stay absent. Co-authored-by: drewjsdev <drewjsdev@pm.me>
|
Review. Solid design: card-per-tool, backups before overwrite, idempotent rerun, bash 3.2 safe. Issues, most important first:
Nits:
Fix 1 and 2 before merge. The rest are optional. |
Homebrew rejects --cask together with --installed-on-request. The baseline now uses brew list --cask. Co-authored-by: drewjsdev <drewjsdev@pm.me>
Homebrew 6 refuses skhd and yabai until each formula is trusted. setup trusts the qualified formula, then installs it. 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
Andrew installs this repo on more than one Mac, and some machines should not get every tool.
setupinstalls Homebrew when the Mac does not already have it, then installs and stows only the tools chosen for that machine.What changed
cards/.setuphas no per-tool branches.~/Library/Application Support/dotfiles/selection. The next run reads that file.macos-latestruns shellcheck, a full install, a subset install, a second run, and a check that unselected tools were not installed.Tradeoffs
A manifest plus
install.shkeeps the tool list in one file and the procedure in another. A tap, a cask, or a backup rule becomes another branch in the script, so adding a tool means editing both files. The subset is a flag you type again next time.A card is the whole install record. Taps, formulas, and casks live in that one file, and the Stow package next to it is already the config.
setuponly reconciles the cards named in the selection file. Adding a tool means addingcards/<name>.Chezmoi would replace these Stow packages with its own source tree and its own templates. The packages already mirror
$HOME, and machine-specific values already belong in gitignored~/.zshrc.local. Chezmoi also does not install Homebrew, so package installation would still be a second script.chezmoi applywrites over the file at the target path.setupcopies an existing target aside before it replaces the target, and it leaves a correct symlink alone.What it can remove or overwrite
setupcopies that path to~/Library/Application Support/dotfiles/backups/<timestamp>/and then replaces it with the symlink.~/.configor~/.localis a regular file,setupbacks that path up and replaces it with a directory.~/.configor~/.localis a symlink that points outside this repo,setupbacks the symlink up and replaces it with a directory.~/.configor~/.localand that path is a symlink into this repo,setupbacks the symlink up and replaces it with a directory. The files stay in the package.setupleaves the symlink in place.setupdoes not uninstall Homebrew packages, does not remove symlinks for tools dropped from the selection later, and does not runstow --adopt. Tracked files in the repo stay as they are.Scope
Covers install, the remembered selection, backup, and the macOS workflow. It does not start yabai or skhd, and it does not change the login shell.
Blast radius
On a machine whose Stow links already point at this clone, a second
setupchanges nothing. A real file in the way is copied aside and then replaced.Verification
macos-latestruns the same checks against real Homebrew.