Hacker News new | ask | show | jobs
by kstrauser 3 days ago
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.

1 comments

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.