This repo is a bit more than dotfiles. It includes those, of course, as well as scripts allowing me to setup (or reset) any of my machines very quickly.
Note this is an evolving repo and tends to represent where my machines are on any given day. My motivation is that it allows me to rebuild a machine I own in 2 hours or less, something I've found can be very handy over the years. Use it at your own risk.
- apps Configs for the various apps I use
- machines dotfiles and setup scripts that are applicable per machine
- shared dotfiles and setup scripts that I can use on any machine
Each subfolder of machines is a target you can pass to setup.sh:
- joy my personal laptop
- mac my personal desktop
- work my work machine
The setup script bootstraps itself: it installs the Xcode Command Line Tools
(which provide git), clones this repo to ~/.dotfiles, and re-runs itself from
there. That means you don't need git or ~/.dotfiles to exist ahead of time —
you only need a copy of this repo and the name of the machine you're setting up.
Run setup from Apple's Terminal app (the macOS privacy permissions below
attach to whichever app is running it). On a brand-new Mac git isn't available,
so grab the repo as a zip, extract it, and run the setup script from wherever it
landed:
# Download and extract the repo (anywhere — Downloads is fine)
curl -L https://github.com/ChrisWiegman/dotfiles/archive/refs/heads/main.zip -o dotfiles.zip
unzip dotfiles.zip
cd dotfiles-main
# Run setup for the target machine (joy, mac, or work)
./setup.sh macThe script will install the Xcode Command Line Tools, clone this repo to
~/.dotfiles, and re-exec from there. Once it finishes you can delete the
downloaded copy — ~/.dotfiles is the canonical clone going forward.
Heads up — the first run may stop on purpose. Before doing anything, setup checks that Terminal has the macOS permissions it needs (see below). If they're missing it opens the right Settings panes, tells you what to enable, and stops. Grant them, quit and reopen Terminal, and run
./setup.sh macagain — the second run goes start to finish.
Setup needs two privacy permissions granted to Terminal, because macOS won't let a script grant them itself:
- Full Disk Access — detected automatically by the script.
- App Management — lets Homebrew update apps already in
/Applications. macOS exposes no way to detect this, so setup walks you through it once and remembers (via a marker in~/.cache/dotfiles/) so it won't ask again.
Both are found in System Settings > Privacy & Security. Full Disk Access only takes effect after Terminal is restarted, which is why a fresh machine usually takes two runs.
If you already have git, just clone and run:
git clone https://github.com/ChrisWiegman/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./setup.sh macRe-running ./setup.sh <machine> from ~/.dotfiles at any time is safe and is
how I reset or update a machine.
For the selected machine, setup.sh:
- Checks that Terminal has the required macOS permissions (Full Disk Access and App Management), opening the right Settings panes and stopping if any are missing.
- Installs the Xcode Command Line Tools and sets
zshas the default shell. - Clones this repo to
~/.dotfiles(and re-execs from there) if it isn't already. - Creates
~/Codeand clones any repos listed in the machine'sReposfile. - Installs everything in the machine's
Brewfilevia Homebrew (prompting you to sign in to the Mac App Store first if the Brewfile needs it). - Symlinks the shared and machine-specific config files (ssh, tmux, git, zsh, mise, etc.).
- Links app configs from
apps/(VS Code settings/keybindings) and imports the Terminal theme. - Runs the machine's own
setup.sh, if it has one, for any final machine-specific steps.
The script asks for your administrator password once up front and keeps that access alive for the rest of the run, so you can start it and walk away.