Brandon Invergo, a researcher and free software user, writes about GNU tools, dotfile management, and minimalist web design.
HN commenters repeatedly link his 2012 post on managing dotfiles with GNU Stow, which inspired at least one commenter to build a dotfiles tool.
Which seems to be a bit of a genre, actually:
- https://alexpearce.me/2016/02/managing-dotfiles-with-stow/
- https://protesilaos.com/codelog/gnu-stow-dotfiles/
- https://www.baty.net/2018/managing-dotfiles-with-gnu-stow/
- http://codys.club/blog/2015/07/07/managing-your-dotfiles-with-gnu-stow/
- https://www.bharatkalluri.in/post/manage-dotfiles-using-stow/
Not to mention these closely-related pages:
- http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html
- https://dotfiles.github.io/
- https://wiki.archlinux.org/index.php/Dotfiles
Seems like it’s a bit of a well-kept secret. I last used it in the early 2000s for Unix system administration, when I wanted to deploy GNU tools on Solaris boxes without blowing away the native Solaris tools. That was … just a bit of time ago.
I do this as well! I have this repo [0] at ~/cfg, then I symlink what I need [1] as an init script. My end goal is to be able to run a single script and get everything [2] set up on a new machine (I change machines somewhat frequently and I got the manual process to under 45 minutes, so there's room for improvement). More on setting up Macs [3].
There is also GNU Stow [4] that does something similar, and probably better.
0: https://github.com/andreis/cfg
1: https://github.com/andreis/cfg/blob/master/init.sh#L64-L69
2: brew and brew cask, dotfiles ofc, and a _lot_ of system settings on mac os can be changed via the CLI, see
3: https://github.com/iCHAIT/awesome-macOS#setup
4: http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html
source control + GNU stow
GNU Stow is a symlink farm manager which takes distinct packages of software and/or data located in separate directories on the filesystem, and makes them appear to be installed in the same place. For example, /usr/local/bin could contain symlinks to files within /usr/local/stow/emacs/bin, /usr/local/stow/perl/bin etc., and likewise recursively for any other subdirectories such as .../share, .../man, and so on.
https://www.gnu.org/software/stow/
http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html
For anyone interested in this topic, [0] contains the best setup I've found for storing dotfiles in a git repo, then linking them with GNU Stow. Steps are just:
git clone https://github.com/me/my-dotfile-repo
cd my-dotfile-repo
stow --target=$HOME zsh
stow --target=$HOME vim
...
Elegant, cross-platform, easy to remember.
[0]: http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html
If anyone is interested in setting up multiple platform dotfiles or more complicated setup, GNU stow [1] is just pure genius. It's a very simple approach which works very well for me. It's described in this blog post: http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html
[1]: https://www.gnu.org/software/stow/
A few years ago I read a blog post [0] on using GNU Stow to manage your dotfiles, I loved the idea and it inspired me to create xdot, a minimalist dotfiles manager [1] which I have been using ever since.
[0]: https://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html
[1]: https://github.com/malobre/xdot