Setting up a fresh machine from scratch is slow and error-prone without a single source of truth for your configuration. This repo centralises shell config, app config, bootstrap scripts, and macOS defaults, all symlinked into ~ via GNU Stow so any change made in the repo is immediately live. It is intended for personal use on any Unix-like machine; macOS-specific defaults are available but optional.
- Homebrew — required before running
setup.sh - Git — to clone the repo
- macOS — only required if using
--apply-macos-defaults
$ git clone https://github.com/Harvey-Mackie/dotfiles.git ~/dotfiles
$ cd ~/dotfiles
$ ./setup.sh
// Installs stow, symlinks repo into ~, installs .Brewfile packagesTo also apply macOS system defaults:
$ ./setup.sh --apply-macos-defaults
// Applies defaults then exitsAfter bootstrap, copy the token template and add your local secrets:
$ cp shell/tokens.example.sh shell/tokens.sh
// shell/tokens.sh is gitignored — safe for API keys and local varsThen reload your shell:
source ~/.bashrc # or source ~/.zshrcAdd a new dotfile to the repo and re-stow:
$ stow .
// Symlinks any new files from ~/dotfiles into ~Install or update all packages from the Brewfile:
$ brew bundle --file ~/dotfiles/.Brewfile
// Installs missing packages, skips already-installed onesdotfiles/
├── 📄 setup.sh # Bootstrap: stow + brew bundle + optional macOS defaults
├── 📄 .Brewfile # Source of truth for packages, casks, VS Code extensions
├── 📄 .bash_profile # Loads .bashrc for login shells
├── 📄 .bashrc # Bash startup; sources shell/shared.sh
├── 📄 .zshrc # Zsh startup; sources shell/shared.sh
├── 📄 .tmux.conf # tmux config; references tmux/ for plugins
├── 📄 .gitconfig # Global git config
├── 📁 shell/
│ ├── shared.sh # Shared aliases, navigation shortcuts, sources scripts/
│ └── tokens.example.sh # Template for local secrets (copy to tokens.sh)
├── 📁 scripts/ # Interactive shell functions; auto-sourced via shared.sh
├── 📁 .config/ # App and CLI config (alacritty, nvim, git, gh, starship…)
├── 📁 .ssh/ # SSH host aliases (includes homelab)
├── 📁 macos/ # macOS defaults scripts
├── 📁 init/ # Bootstraps notes and code repos into ~/Documents
└── 📁 tmux/ # Vendored tmux pluginsflowchart TD
A["Clone repo to ~/dotfiles"] --> B["Run setup.sh"]
B --> C{"Homebrew installed?"}
C -- No --> D["Exit with error"]
C -- Yes --> E["Install/repair stow via brew"]
E --> F["stow . symlinks repo into ~"]
F --> G["brew bundle installs packages"]
G --> H{"--apply-macos-defaults?"}
H -- Yes --> I["bash macos/defaults.sh"]
H -- No --> J["Done"]
I --> J
- GNU Stow — symlink management used to link this repo into
~ - Homebrew — package manager;
.Brewfileis the package manifest - Using the SSH Config File — SSH config patterns and options