Ramblings of an aging IT geek
← Ramblings of an aging IT geek
tooling

the dotfiles finally make sense

Reorganising my dotfiles around a bare git repo and GNU stow, so a fresh machine is set up in minutes rather than an evening.

A terminal glowing on a dark keyboard

For years my dotfiles were a tarball, a private gist, and a vague memory of which machine had the good version. Every fresh install was an evening of copying configs across, discovering the shell didn't quite work, and patching it by hand until it felt right. Then I'd forget to push the fix back, and the rot would start again.

I've finally done it properly, and the approach is dull, which is the point. Everything lives in one git repo. I use GNU stow to symlink the files into place, so the repo holds the canonical copy and ~ just points at it. Editing a config in my home directory is editing the file in the repo. There's no sync step to forget.

git clone [email protected]:me/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
stow shell git nvim tmux

The folders are grouped by tool, so stow nvim drops the neovim config and nothing else. On a minimal box I can skip the packages I don't want. The whole thing is committed, so the question "what did I change and why" has an answer in the log instead of in my unreliable memory.

It took an afternoon to migrate and I should have done it years ago. A fresh machine is now a clone and one command, and it's the same setup everywhere, which means when I fix something I fix it once.