Skip to content
Sarang

2026/ Case study · Live

.dotfiles

My macOS development environment as code — one script installs Homebrew packages, Oh My Zsh and symlinked configs for zsh, git, tmux and more.

[Shell] — [Bash] — [Zsh] — [GNU Stow] — [Homebrew] — [tmux] — [Git]

Overview

A reproducible machine setup: a Brewfile declares the CLI tools and runtimes, GNU Stow symlinks each config package into $HOME, and a non-destructive test script validates the repo before anything is installed.

01/ Architecture

Each top-level directory is a Stow package mirroring the layout of $HOME:

  • zsh/ — .zshrc plus split aliases.zsh, exports.zsh and functions.zsh
  • git/ — .gitconfig
  • tmux/ — .tmux.conf
  • scripts/ — small executables in ~/.local/bin

A Brewfile keeps software installation separate from configuration.

02/ Implementation

install.sh runs with set -e: it installs Homebrew if missing (handling both Apple Silicon and Intel prefixes), disables analytics, runs brew bundle, installs Oh My Zsh without letting it overwrite the Stow-managed .zshrc, then runs stow -R for every package. Helper scripts include brewup (update, upgrade and clean up Homebrew) and cproj (jump into a project directory).

The Brewfile covers Stow, git and git-lfs, jq, bat, eza, fzf, ripgrep, fd, tmux, Node, Python, pnpm, Prettier, the AWS CLI and Starship.

03/ Testing

test.sh is intentionally non-destructive: it checks that the repository is valid and ready to install — without installing packages, editing configs or creating symlinks — and reports passes, failures and warnings.

04/ Trade-offs

Symlinks via Stow keep every config editable in one git repo, at the cost of a fixed directory convention. Every step is idempotent, so re-running the installer is safe — but it targets macOS only.