My customized shell script isn't as robust as it should be and I don't want to reinvent an inferior version of what must surely already exist.<p>What tools would you recommend for managing dotfiles that are robust, doesn't have external dependencies, uses git and are idempotent?<p>I'd like something that manages directories of files (e.g. ~/.vim/ftplugin/) in sub-directories, as well as in $HOME. If the tool can deal with multiple systems (MacOS, CentOS, debian) then even better!<p>Thanks!
Arch wiki has a nice list: <a href="https://wiki.archlinux.org/index.php/Dotfiles#Tools" rel="nofollow">https://wiki.archlinux.org/index.php/Dotfiles#Tools</a><p>I made a dotfile management tool: <a href="https://github.com/knoebber/dotfile" rel="nofollow">https://github.com/knoebber/dotfile</a> , but it's not based on git or designed for directories of files.<p>I think Chezmoi would fit your usecase well: <a href="https://www.chezmoi.io/" rel="nofollow">https://www.chezmoi.io/</a>
Here's a guide using a git bare repository: <a href="https://www.atlassian.com/git/tutorials/dotfiles" rel="nofollow">https://www.atlassian.com/git/tutorials/dotfiles</a>
I’m biased, but would recommend trying yadm.<p><a href="https://yadm.io" rel="nofollow">https://yadm.io</a><p>I specifically have a design goal of very little external dependency. It only requires Git and Bash be present, so it is quite portable. Many people even use it on some network equipment. You can simply download the script if it isn’t packaged somewhere.<p>It can easily handle directories of files, but also submodules. Many people add vim plugin Git repos directly as submodules.<p>If you are familiar with Git, you’ll find yadm extremely easy to use. When you need them, more features are there to solve specific problems, like bootstrapping operations, encrypting private data, templating, or system dependent alternate files.<p>On a new system you can quickly bootstrap your existing dotfiles repo using <a href="https://bootstrap.yadm.io" rel="nofollow">https://bootstrap.yadm.io</a>, without yadm installed yet. This is mostly useful if you’ve included yadm directly in you dotfiles (directly, or as a submodule, or as some installation during bootstrap).
<a href="https://github.com/nix-community/home-manager" rel="nofollow">https://github.com/nix-community/home-manager</a> is much more than that, but it can be easily used as a basic dotfiles manager the way you described it
I use yadm (<a href="https://yadm.io/" rel="nofollow">https://yadm.io/</a>), and like it for dealing with multiple systems because of it's alternates system (<a href="https://yadm.io/docs/alternates#" rel="nofollow">https://yadm.io/docs/alternates#</a>). It's git based, and works on various systems (your list is covered).<p>edit: Note if you're on Debian stable, the current package is 1.x. At this point testing has moved on to 3.x. It's probably worth going straight to 3.x to avoid reworking alternates and dealing with other changes. The testing/unstable package is easy to backport (look up simple sid backport).
Although I just use git (with symlinks from ~/.dotfiles to wherever the software is actually expecting the config), most people I know use <a href="https://yadm.io" rel="nofollow">https://yadm.io</a> instead.
chezmoi [1] looks like a tool for power-users. I'll give it a try and see how it goes. It seems to be more capable (and more complex) than dotbot [2]<p>[1] <a href="https://github.com/twpayne/chezmoi" rel="nofollow">https://github.com/twpayne/chezmoi</a><p>[2] <a href="https://github.com/anishathalye/dotbot#plugins" rel="nofollow">https://github.com/anishathalye/dotbot#plugins</a>