chezmoi: add post
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Jef Roosens 2025-01-31 09:23:55 +01:00
parent 5753ee14cf
commit b4e87ee7ae
Signed by: Jef Roosens
GPG key ID: 21FD3D77D56BAF49

37
content/garden/chezmoi.md Normal file
View file

@ -0,0 +1,37 @@
---
title: "I like Chezmoi"
date: 2025-01-31T09:08:10+01:00
---
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](https://git.rustybever.be/Chewing_Bever/dotfiles2). A friend of mine
coincidentally just talked to me about [Chezmoi](https://www.chezmoi.io/), 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.