I like Chezmoi
After stubbornly (lazily) refusing to fix my Neovim config on my “desktop” (a.k.a an older laptop with a GPU), I finally caved in and planned to fix it. My dotfiles were (still are) a mess as well, so I figured I’d look for a dotfiles manager to tidy things up.
Originally I used a Git bare repo, but that’s a lot of manual labour and it was in complete disarray, so I decided to start an entirely new one. A friend of mine coincidentally just talked to me about Chezmoi, so I decided to give it a go.
Its installation was as easy as can be, with it being in the official
repositories on Arch, and getting started with it is pretty simple. chezmoi init
initializes a local repository where Chezmoi stores all your dotfiles.
Chezmoi is basically a wrapper around Git that tracks some extra metadata where
required. chezmoi add
adds files to the staged files, and chezmoi git
is
used to actuallly commit and push dotfiles to the repository. At first I was a
little confused as to how I was supposed to actually commit files, but after
having discovered the Git wrapper, I was honestly quite happy with it.
Offloading all Git-related commands to the actual Git tool is much less error
prone and allows you to still organize your commits the way you want. Chezmoi
does however support automatic commits and pushes; I might look into that some
day.
Setting up your dotfiles on another machine is straightforward. Running
chezmoi init [your repo]
on the machine clones your dotfiles, and chezmoi apply
will apply the changes to the machine, simple as that.
There’s a lot more features such as secret management and templates, but I haven’t had a need for those (yet). Either way, I think Chezmoi is a nice tool that will hopefully help me keep my dotfile madness in check.