These are my dotfiles common configs. They aren't intended to be useful to anyone other than myself.
Files are organized by topic:
- git: everything relating to git (aliases, configs, etc).
- nvim: nvim configuration and plugins.
- zsh/rc: primary zshrc file
- zsh/zsh.d/*: purpose or os-specific zsh includes
- tty: everything related to terminal configuration ( Kitty).
- bin: utilities of various kinds
- ... etc.
| System | Release |
|---|---|
| macOS | current |
| Ubuntu, including WSL2 | 26.04 LTS or later |
| Windows (MSYS2) | current |
Ubuntu 26.04 is the oldest supported Ubuntu. The package lists assume its apt
packages exist, so an older release can fail partway through an install. The
floor moves up with the machine: when the machine upgrades, raise it here and in
AGENTS.md, and move any tool the new floor packages back into the shared
universal list. bin/detect-os recognizes Ubuntu only, so Debian itself is not
supported.
On a fresh machine, run the two scripts in this order:
./packages/install.sh base # 1. install tools (see categories below)
./bootstrap.sh # 2. symlink the configs into placeOrder matters: bootstrap.sh only creates symlinks, but many of those configs
(bat themes, starship, kitty, nvim plugins, …) are inert or error until the
corresponding package from step 1 is installed. install.sh also bootstraps
Homebrew / yq / rustup, which nothing else sets up.
Re-running either script later is safe — both are idempotent.
On a work machine, add a third step. zsh/rc reads zsh/zsh.d/work.zsh only
when a flag file exists:
touch ~/.config/zsh.d/enable-work # 3. work machines onlyGit ignores the flag, so you set it on each machine. Delete it to turn the include off again.
Installs packages via the OS package manager, plus cargo and rustup.
Packages are declared in packages/packages.yml, grouped into categories.
./packages/install.sh base # all machines
./packages/install.sh base personal # + personal machines
./packages/install.sh base personal work # + work tooling
./packages/install.sh -d base # dry run
./packages/install.sh -c base # check every entry exists on this OS
./packages/install.sh -v base # check the commands run in zsh-c confirms each package, crate and install-script URL exists for this OS
without installing anything, so run it after editing packages.yml. -v
confirms the commands listed under commands in packages.yml run from a fresh
interactive zsh. An install runs -v itself when it finishes. A step that fails
is reported at the end instead of stopping the run.
The bootstrap.sh script will install the dotfiles in their respective
locations.
If a real file (or a stale symlink) is already sitting at a destination, it is
moved aside to <dest>.backup.<YYYYmmddHHMMSS> before the symlink is created,
and a summary of everything moved is printed at the end. Pass -f to delete
those files instead of backing them up. Destinations that already point at the
right repo file are left untouched, so re-running is safe.
The only part of the script which needs to be changed is the FILES array at
the start of bootstrap.sh. The FILES array contains a mapping of
every file in the repository and the location it should be linked to, in
destination -> repo/path form.
declare -a FILES=(
"${HOME}/.zshrc -> zsh/rc"
"${HOME}/.config/zsh.d -> zsh/zsh.d"
"${HOME}/.gitconfig -> git/gitconfig"
"${HOME}/.gitignore_global -> git/gitignore_global"
"${HOME}/.tigrc -> git/tigrc"
"${HOME}/.config/nvim/init.lua -> nvim/init.lua"
# ... etc
)OS-specific arrays (FILES_DARWIN / FILES_DEBIAN,
FILES_KITTY) are merged in automatically for the detected OS.
Usage: ./bootstrap.sh [-h|--help] [-f] [-d] [-l]
--help | -h
Prints this menu
-d
Dry run. Echoes the commands which would be executed to
stdout but doesn't modify anything.
-f
Force. Deletes any file that is in the way instead of moving it
to a timestamped .backup copy first.
-l
Lists the files that would be installed by this program. Each
full path is printed on a new line making the output suitable
for piping to xargs or using as a for-loop input, i.e:
for file in $(./bootstrap.sh -l); do
ls -lah "$file";
done