Hacker News new | ask | show | jobs
by technojamin 3 days ago
I've checked out stow, chezmoi, yadm, and others over the years, but I originally started off by rolling my own dotfiles setup with a Git repo about 6 years ago: https://github.com/jaminthorns/environment

I don't really recommend it to others, since there's all these great tools that have the features you need (per-machine config, secrets, templating), but I get a deep satisfaction from the fact that I understand every part of this setup from top to bottom. It only has the functionality I need, and I know it doesn't depend on anything that might become unmaintained since it's just POSIX shell scripts.

Even still, I might eventually make the jump to something like chezmoi or nix if I'm not able to implement something I need easily, but that hasn't happened yet.

3 comments

> don't really recommend it to others, since there's all these great tools that have the features you need

I thought about using any one of those tools but happily chose shell scripts and symlinks instead. It hasn't let me down in almost a decade with https://github.com/nickjj/dotfriedrice and would highly recommend this approach.

It's basically a 2,500 line shell script to fully automate setting up a system from scratch in a general purpose / opinionated but customizable way that works on Arch Linux, Debian, Ubuntu, macOS and supports WSL 2 in Windows. I have it running on multiple systems, no need to even fork it since it uses patterns suitable for making changes in git ignored files and also has a config file for certain things.

When it comes to setting up a complete desktop environment or even just terminal based tools, dotfiles IMO are more than config files. There's install scripts, packages, system level configs, running commands, OS specific differences and more. It's really nice to be able to run 1 command and have a fresh system ready to go in about 10 minutes.

Shell script is probably my favorite language at this point.

Haha, I'll elaborate on that a bit. I don't recommend rolling your own setup to most people that I encourage to version their dotfiles. The vast majority of the developers I've met don't have any type of dotfiles setup, so I wouldn't want to recommend something I know would take significantly more work or overwhelm them. If they're going from no versioning to something, that's a huge improvement, and it's nice to get a lot of the advanced features for free.

But, for the people who value the "toolbench" of their craft, investing in it over time, and having it grow with them long-term, I will absolutely proselytize the reasons I've stayed with my custom-built setup. You're clearly one of those people, thanks for sharing. :)

I moved from custom POSIX shell scripts to chezmoi due to the complexity of handling lots of random environments. It really simplified getting up and running on disparate server environments.

The last few years I've rarely had to switch machines, so maybe chezmoi is overkill now, but it works well, so I'm in no rush to simplify again just for the sake of it (and who knows if I'll need chezmoi's features for real again in the future).

Same, I wrote a simple program reading master file and copying dotfiles according to "recipes" in it.