(2016)<p>> <i>GitHub even has a website dedicated to different ways of organising and deploying them <<a href="https://dotfiles.github.com/" rel="nofollow">https://dotfiles.github.com/</a>>.</i><p>404, I presume <a href="https://dotfiles.github.io" rel="nofollow">https://dotfiles.github.io</a> is what they were referring to, which is not affiliated with GitHub at all. (And there you see one of the reasons for shifting user content away from *.github.com to a different domain.)<p>----<p>This submission is presumably inspired by a current/recent discussion at <a href="https://news.ycombinator.com/item?id=27134249" rel="nofollow">https://news.ycombinator.com/item?id=27134249</a> on <i>A Way To Manage Dotfiles</i>, <a href="https://github.com/kalkayan/dotfiles" rel="nofollow">https://github.com/kalkayan/dotfiles</a>, which is predicated upon another approach: using a bare Git repository with its work tree as the root of $HOME.
I've tried using a number of these solutions but I always have the same problem which is that after a while not using it regularly I'd want to make a change and forget the magic incantations, get frustrated and stop bothering.<p>To be fair I also have this problem a lot administering my linux machines because they just work - until they don't. Then I have to re-learn what to do to fix the problem.
I've tried this and a lot of other dotfile managers (homesick, homeshick, etc), my current favorite and what I'm using now is YADM:<p><a href="https://yadm.io/" rel="nofollow">https://yadm.io/</a>
If I had the opportunity I always thought it would be fun to learn and then modify the Linux kernel so that file lookups to ~/.* get redirected to ~/config/.* and I could finally have a clean home directory.
Nix plus homemanager plus direnv is the best solution I have found so far. Managing config (dotfiles) is only one part of the problem. You usually also need some way to install applications/tools ideally in a specific version. your config might not work as expected with a different version and you would have to remember what exactly you installed. As a developer using direnv will even allow you to use different versions of tools for different projects/ directories
I just make my home directory be a git repo directly. That's even simpler -- no symlinks. You have to get used to having a repo with many unchecked-in files, but it works well enough. I have a git alias or two to help. This has been a good solution for me for more than a decade across ~a dozen OS installations.
I use GNU Stow to manage my dotfiles and it's awesome because with Stow and Brew, I could create a script that setup everything in my machine from scratch, with one command. If anyone wants to take a look, it's here: <a href="https://GitHub.com/diegoholiveira/dotfiles" rel="nofollow">https://GitHub.com/diegoholiveira/dotfiles</a>
Whenever I install a new distro, I never format /home partition. Also, I rename my home directory to <username>_old and create a new one. I start with mv of the most common files/directories like .bashrc/.mozilla etc and gradually move more as I need. This way after 2-3 months, I've left the old/unused cruft behind and can remove the _old home directory (in practice I keep them around because the size is small since I keep most of my documents in a separate partition and just symlink to that). If I'm changing computers, I restore the home from daily backup, rename it to _old and do the same thing.
> But, as you can imagine, manually linking dotfiles quickly becomes laborious and error-prone. One solution is to create a script that links the files for you, but I think there’s a better way.<p>Yeah I have no issues doing this. I can count on any machine having bash and git, and I don't have to relearn how the tool works every few months.
I think that in this case like in many others, the more the tool approximates the behavior of something you already know, the easier it is to use. I don't want to lose time learning yet another tool just for syncing 7 dotfiles from a machine to another.<p>I've been going with `vcsh`[1] for 2 years now -- essentially a wrapper git that works with a home directory git repo without all the annoyances. To be fair I don't even exactly knows how it works (which may be a testament to how nicely it is done). It's just basic git commands and it doesn't create a .git in your home folder.<p>As simple as :
$ vcsh {name_of_repo} status # check changed files
$ vcsh {name_of_repo} add ..
$ vcsh {name_of_repo} commit ..
$ vcsh {name_of_repo} pull ..
$ vcsh {name_of_repo} push ..<p>[1]: <a href="https://github.com/RichiH/vcsh" rel="nofollow">https://github.com/RichiH/vcsh</a>
chezmoi seems really promising. Been planning on migrating my dotfiles to it soon:<p><a href="https://www.chezmoi.io/" rel="nofollow">https://www.chezmoi.io/</a>
More dotfiles stuff on the vcs-home wiki:<p><a href="https://vcs-home.branchable.com/" rel="nofollow">https://vcs-home.branchable.com/</a>
I used stow for a few years, but I outgrew stow when dealing with different architectures (arm vs x86_64) and OS (macOS, Debian based, RHEL based).<p>I settled upon chezmoi and don't have any complaints aside from it being a little bit cumbersome when merging (mostly due to my inexperience)<p><a href="https://github.com/twpayne/chezmoi" rel="nofollow">https://github.com/twpayne/chezmoi</a>
I did a CTRL + F for “docker” and “container” and surprisingly didn’t see any hits in the first page of comments.<p>I’ve found it’s a lot easier to just make a single docker image of my favorite OS, load it with my dotfiles, vim plugins, etc. and then pull it down wherever I am.<p>Of course, this means you need Docker running on the machine. I’ve hit a couple of snags with credentials and key files, but I just end up mounting them as a volume or environment variable.<p>I followed this guide I found on HN, and it’s worked incredibly well.<p><a href="https://news.ycombinator.com/item?id=26669474" rel="nofollow">https://news.ycombinator.com/item?id=26669474</a>
I manage them and stuff installed manually with <a href="https://zolk3ri.name/cgit/zpkg/" rel="nofollow">https://zolk3ri.name/cgit/zpkg/</a>.