💾 Archived View for senders.io › gemlog › 2023-04-03-source-controlled-dotfiles.gmi captured on 2024-02-05 at 09:42:06. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-04-19)
-=-=-=-=-=-=-
It's not too uncommon to come across tech folk managing their dotfiles in source control. Conceptually, this makes a lot of sense - you tailor your configurations for certain programs, you want to be able to bring those around with you and also make sure if you break something, you can revert it. Plus, they're just text, so it makes sense, right?
Sort of.
[http] cgit/dotfiles/README.org
No surprise here, it's just a bunch of dotfiles. But what's more interesting is how I am managing it.
I came across GNU Stow and it SEEMED like the ideal program to do this. I can type "stow ." to create symlinks between my dotfiles, and ensure the directories exist, etc - all without having to update anything but your files!
But it's not that great. To be frank - it's a bit of a mess.
Firstly, the documentation is very odd. The texinfo page isn't so bad, but the man-pages are a bit of a mess. The introduction in the texinfo pages clarifies a bit of why it's this way. Stow was made for admins to manage files within a system with the man pages very much writing for this system admin use case.
// Aside - info <command> is actually a fairly nice UX for applications that support it. I've never really used before! 🤷♀️
But docs can be parsed with enough time, what can't are the edge cases. .stowrc seems to be default flags, but it wasn't picking up everything? The regex not being intuitive. And bugs with it's --dotfiles setting. The dot-file configuration was failing to work with the .config folder, and it remains open. Which was unfortunate because dot- syntax was something I was excited for because a git repo of all hidden files is a bit tedious.
But ultimately it's useful. I can do "stow ." and sync any new files into their proper locations. And has some other quality of life features over a simple bash-script that generates the symlinks for you.
If you take a look you can see I'm basically just storing a handful of configs, and ones that are very much "universal".
I find a lot of people are like "if you do something it should be in git!". Managing dotfiles in git makes sense, but it's not unintuitive. This might be a "my brain" type thing. But I ONLY use git on the command line. And with the files being in my home directory - I'm not exactly making modifications while in my configs/dotfiles folder. So it's just sorta... backwards? But I need to be mindful, that's really the thing here. And by managing symlinks and having git I can always check on the diffs.
But ultimately, things like my gemlogs, website, etc - they're rarely ACTUALLY managed by git - even if the workflow makes sense - there is little incentive. And ultimately, that's what stops me.
I read through this and realize without having watched me struggle with Stows frustrating moment. But I was ranting a bit in the Fedi and chatted a bit about how nix does its configuration management and GNU Guix which shares a similar philosophy / idea around reproducible configuration based OSes.
And working in infrastructure, there is always things like puppet and the like to basically manage stuff, but this also feels a tad overkill for someone who runs only 1 PC, 2 laptops, and a server - all of which are FAIRLY unique in their setups.
So let's see. Will I keep it up to date? They don't change often, emacs.d is really the place I expect these to happen. I have been pretty good but it's only been a few days, so like, of course I'm on top of it. But ultimately, I see myself committing when I need to sync between my work laptop and personal computer. So making branches and pushing changes then reconciling anything.
I always feel cheesy leaving these "engagement-esque" questions at the end, but genuinely, do you manage your PC configurations? How? Because this is like the bare minimum I can do, but I don't feel like the workflow respects the process much? Anyway. Thanks for reading.