All Articles

How I Rebuilt My Dotfiles from Scratch in a Weekend

A complete walkthrough of my dotfiles setup: zsh, tmux, neovim, and a single bootstrap script that provisions a new machine in under 10 minutes.

··7 min read
Terminal screen showing clean shell prompt

Why bother?

My old dotfiles were a graveyard of configs I no longer understood. Half the aliases were for tools I had stopped using. The neovim config had plugins that conflicted with each other.

Starting fresh is terrifying and liberating at the same time.

The structure I landed on

~/.dotfiles/
  install.sh       ← single entry point
  zsh/
    .zshrc
    aliases.zsh
    exports.zsh
  tmux/
    .tmux.conf
  nvim/
    init.lua
    lua/
      plugins/

The bootstrap script

The install script does four things:

  1. Symlinks every config file to its expected location
  2. Installs Homebrew packages from a Brewfile
  3. Sets up Oh My Zsh and plugins
  4. Runs nvim --headless +PlugInstall +qa
#!/usr/bin/env bash
set -e
DOTFILES="$HOME/.dotfiles"

# Symlinks
ln -sf "$DOTFILES/zsh/.zshrc" "$HOME/.zshrc"
ln -sf "$DOTFILES/tmux/.tmux.conf" "$HOME/.tmux.conf"
ln -sf "$DOTFILES/nvim" "$HOME/.config/nvim"

# Packages
brew bundle --file="$DOTFILES/Brewfile"

What I would do differently

Version-pinning Homebrew packages is harder than it sounds. I now keep a Brewfile.lock.json in the repo to avoid surprise upgrades breaking my terminal.

The result

A new machine goes from zero to fully configured in about 8 minutes. That peace of mind is worth the weekend it took to get here.

Share