From b4e87ee7ae6b55258a18765cd4282de4298337f3 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 31 Jan 2025 09:23:55 +0100 Subject: [PATCH] chezmoi: add post --- content/garden/chezmoi.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 content/garden/chezmoi.md diff --git a/content/garden/chezmoi.md b/content/garden/chezmoi.md new file mode 100644 index 0000000..e68eaba --- /dev/null +++ b/content/garden/chezmoi.md @@ -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.