Hacker News new | ask | show | jobs
by bkummel 4 days ago
I didn't even know that managing dotfiles was a "problem space".
2 comments

It's dead simple to manage files in git or such. What Chezmoi adds over that are niceties like:

* Permission management, so that ssh wouldn't refuse to log you in because ~/.ssh/authorized_keys is 0755 instead of 0644.

* Templating, because ~/.ssh/config has slightly different options on Mac and Linux, so you can't use the exact same file contents as-is on both systems.

I can run `chezmoi apply` and get all the files in the right places and they're all setup just right. Like so many others, I'd previously built my own ad-hoc system to handle these things, and it ended up looking like a crappy, half-baked version of Chezmoi. When it came up on my radar I immediately ported my own system over to it and never looked back.

Also encryption with `age`.

My ssh config has actual domain names of servers I don't want to publish to the whole internet so that file is encrypted on my public github dotfiles repo.

Chezmoi automatically decrypts it on `chezmoi update` and I don't need to think about it much unless I'm editing it.

Oh, that's slick. I haven't needed to do that yet and I keep my stuff in a private repo, but see the benefits to it.
I feel that "building in public" works - even for my dotfiles. And it forces me to properly consider what data is public and what isn't from the start.
Even just as a user of nix there has been this problem of how to manage dotfiles - people have git repositories for them but they are copies, because the actual dotfile in use is never tracked

For a System administrator the problem is many orders of magnitude worse