I’m wondering if there is a new tool out there that I’m missing out on.
Git and symbolic links still.
Ive heard good things about GNU Stow.
If you’re using symlinks, you should definitely check out Stow.
deleted by creator
i take a Phoenix approach with my dotfiles.
Once a decade when my computer crashes and burns, from the ashes emerges a blank slate of dotfiles that is purged of all unnecessary hacks that have accumulated. With a tear and a hopeful outlook, I rush to set the settings I am actually dependent on.
I really need to take more interest in backing up my dotfiles 😭
https://www.chezmoi.io/ if you’ve got some complexity with your setup. otherwise, could be overkill.
Had a homebrew Git setup for ages and recently started using Chezmoi. It’s only been a few weeks, but so far it’s been pretty great!
I use Chezmoi but I have to point out some of its downfalls vs. other dotfile managers, particularly if someone is looking to migrate to it.
- Go’s templating lib is incredibly unergonomic.
- Identifying file perms and visibility in by special naming convention is pretty gross. Also makes it more difficult to migrate to another solution.
- If you’re deleting files, you need to remember to do it through
chezmoi remove ...
. You can’t justrm
them from your dotfiles directory, because chezmoi does not sync state; it simply applies what’s currently in your repo. - Handling multiple systems through .chezmoiignore ends up being overly verbose and unintuitive vs. the approach used by other dotfile managers
Despite these gripes I still use it because deployment via a single binary is convenient, and there’s enough control through the generated config file + system info to handle multiple kinds of deployments sort-of-sensibly (see point 4 above).
I adore chezmoi
Like to see so many fellow nix(os)ers here, I think the amount/ratio of nixers here is quite a bit higher than previously on reddit.
🫡
I use git (without remote repo, but could be easily added). Actually this simple bare git repo technique is something I enjoy doing in lots of places where config files lie.
Basically, it’s only:
alias config="/usr/bin/git --git-dir=\${HOME}/.myconf/ --work-tree=\${HOME}"
Of course, a first time setup is required:
git init --bare $HOME/.myconf config config status.showUntrackedFiles no
I got this setup from a comment on HackerNews long ago. OP comment was rather insightful: “No extra tooling, no symlinks, files are tracked on a version control system, you can use different branches for different computers, you can replicate you configuration easily on new installation.”
But I never used any branches, prefer to keep it extremely KISS. I even avoid commiting, just staging area that I keep updating with each OS upgrade. Only this bit of extension I use… since I don’t push to any remotes (prefer keeping dotfiles private), I needed a way to copy all of the tracked files (e.g. to have my settings on a work laptop, of course I then go ahead and clean any boilerplate before moving such an ‘exported’ folder)…
config_export() { echo "Copying only staged files, it is recommended to run beforehand: $ config add -u ~" mkdir -p ~/.config_export/ CONFIG_FILES=$(config status | /usr/bin/grep 'new file:' | cut -d':' -f2 | sed -E 's/^ +//') printf "%s\n" "${CONFIG_FILES[@]}" | xargs -I {} cp --parent '{}' ~/.config_export/ ls -halt ~/.config_export/ }
I’m surprised it’s not already mentioned in these comments: https://yadm.io/
They’re in git
I prefer to keep tooling for that at a minimum. Therefore I use git only. My approach is taken from here: https://www.atlassian.com/git/tutorials/dotfiles The only difference: My git alias is
dotfiles
notconfig
. I find that to be less confusing. Additionally, I source system-specific configs, where appropriate. These are not stored in dotfiles. There is a small todo section in my readme.I do the same! It works quite well.
Tried all the fancy ideas, never stuck with it. I just use git to track changes now and move on with my life. There are like four functions I carry around with me, then whatever path additions and init scripts I pile up. It’s so light it doesn’t really matter when I move to a new machine
deleted by creator
Are you me? I do the exact same thing… only I also made a Makefile to do all the stow commands for me.
deleted by creator
Or maybe you’re me, because that’s what I do. Git + Stow + Makefile.
I still put them in gists, with no real tooling. I pull them in selectively when I get a new machine.
https://github.com/technicalpickles/homesick
It’s a bit old (hasn’t been updated in 4 years), but works great.I used bare git repo before, then switch to GNU Stow + Nix home-manager.
deleted by creator