Personal macOS system configuration files managed with GNU Stow.
Run the install script to set up a new macOS machine from scratch:
curl -fsSL https://raw.githubusercontent.com/USERNAME/dotfiles/main/scripts/install.sh | bashThe script will:
- Install Xcode Command Line Tools
- Install Homebrew
- Install and authenticate GitHub CLI
- Install all Homebrew packages
- Stow dotfiles configurations
- Set up shell and local overrides
The script is idempotent - safe to run multiple times.
cd ~/git/dotfiles
git pull
./scripts/install.shAll themeable tools use Catppuccin Frappe for a consistent look.
Themed tools:
- Ghostty (terminal emulator)
- Starship prompt
- Neovim (via lazy.nvim plugin)
- bat (syntax highlighting)
- delta (git diffs)
- lazygit
- fzf
When adding new tools, prefer Catppuccin Frappe if a theme is available.
dotfiles/
├── zsh/ # Zsh shell configuration
│ ├── .zshrc
│ └── .zsh/
│ ├── aliases.zsh
│ ├── functions.zsh
│ └── path.zsh
├── git/ # Git configuration
│ ├── .gitconfig
│ └── .config/git/ignore
├── nvim/ # Neovim configuration
│ └── .config/nvim/init.lua
├── starship/ # Starship prompt
│ └── .config/starship.toml
├── bat/ # bat configuration
│ └── .config/bat/config
├── lazygit/ # lazygit configuration
│ └── .config/lazygit/config.yml
├── ghostty/ # Ghostty terminal emulator
│ └── .config/ghostty/config
├── ssh/ # SSH configuration
│ └── .ssh/
│ ├── config
│ └── config.d/
├── homebrew/ # Brewfile (not stowed)
│ └── Brewfile # All Homebrew packages
├── scripts/ # Installation scripts
│ ├── install.sh # Unified installer (idempotent)
│ └── macos-defaults.sh # macOS system preferences
└── local/ # Templates for local overrides
├── .zshrc.local.example
└── .gitconfig.local.example
Machine-specific settings go in .local files which are not tracked by git:
~/.zshrc.local- Machine-specific shell settings, paths, secrets, extra packages~/.gitconfig.local- Git user identity and work repository configuration
Templates are provided in the local/ directory.
~/.zshrc.local for machine-specific customizations:
# Corporate proxy
export HTTP_PROXY="http://proxy.work.com:8080"
export HTTPS_PROXY="http://proxy.work.com:8080"
# Machine-specific paths
export PATH="/opt/corporate-tools/bin:$PATH"
# Install machine-specific packages
# brew install terraform aws-cli kubectlThe install script sets up your git identity in ~/.gitconfig.local and optionally configures automatic work email switching using git's conditional includes.
If you specified a work email during installation, git will automatically use your work email for repositories owned by your company:
[user]
name = Your Name
email = your.personal@email.com
# Work repository configuration
# Automatically uses work email for repos owned by: company
# SSH remotes: git@github.com:company/*
[includeIf "hasconfig:remote.*.url:git@github.com:company/**"]
path = ~/.gitconfig.work
# HTTPS remotes: https://github.com/company/*
[includeIf "hasconfig:remote.*.url:https://github.com/company/**"]
path = ~/.gitconfig.workWhere ~/.gitconfig.work contains:
[user]
email = your.work@company.comThis way, personal repos use your personal email, and work repos automatically use your work email.
Secrets are managed via 1Password CLI. Install it:
brew install 1password-cli
op account addUse secrets in your shell:
# In ~/.zshrc.local
export API_KEY=$(op read "op://Personal/Service/api-key")-
Create a new directory for the package:
mkdir -p newpackage/.config/newapp
-
Add configuration files mirroring the home directory structure:
# Files will be symlinked to ~/.config/newapp/config vim newpackage/.config/newapp/config -
Stow the package:
stow -v newpackage
# Stow a single package
stow -v --target=$HOME zsh
# Restow (useful after changes)
stow -v --restow --target=$HOME zsh
# Unstow (remove symlinks)
stow -v --delete --target=$HOME zsh
# Dry run (preview changes)
stow -v --no --target=$HOME zsh| Tool | Description |
|---|---|
| starship | Cross-shell prompt |
| eza | Modern ls replacement |
| bat | Cat with syntax highlighting |
| ripgrep | Fast grep alternative |
| fd | Fast find alternative |
| fzf | Fuzzy finder |
| zoxide | Smarter cd |
| delta | Better git diffs |
| lazygit | Terminal UI for git |
MIT