Follow

What do y'all use to manage/backup your dotfiles? Why'd ya pick it?

I've been meaning to set something up, but I keep falling into choice-paralysis and putting it off.

Leading contenders include:

YADM (bash) thelocehiliosan.github.io/yadm
dot (rust) github.com/ubnt-intrepid/dot
GNU Stow (perl) gnu.org/software/stow/
doing it manually with shell aliases: developer.atlassian.com/blog/2
chezmoi: (go) github.com/twpayne/chezmoi

Currently leaning towards chezmoi (because most features) or YADM (because pure bash)

^^^ cc @kungtotte —your recent toot about YADM was what reminded me that I really ought to get this set up.

@codesections I looked through the list on the Arch wiki when I was deciding, and the reasons I listed in my other toot were the main ones. I want my files to stay in their proper place and still be managed, and I don't want to track all of my ~

YADM solves those easily. Its main downside is it doesn't let you track files outside of ~. It does have a bootstrap feature that you might be able to abuse with symlinking things from /etc to files in ~

@kungtotte

Hmm, when you say it doesn't track files outside of ~, do you mean "just in the ~ dir itself" or "~ and it's subdirectories"? (I.e., can it still track files in `~/.config` ?

@codesections oh yeah, it tracks anything inside /home/user/ and below, but it can't track things in /etc for example.

@codesections another neat feature (AFAIK chezmoi does this too) is per system/user/whatever files. I run Void on my desktop and Manjaro on my laptop for example, so I can have different dotfiles based on their hostnames in this case. YADM solves this by using files named e.g. .bashrc##%.hostname and then symlinking .bashrc->.bashrc##%.hostname

@kungtotte

> don't want to track all of ~

I've had at least some success for dirs I don't want to track as a whole by putting * in .gitignore

then I add exceptions, eg

!.bashrc

@codesections

@codesections Just git with a script that copies my dotfiles into the local repository.

@trawzified @kensanata @chozron

How do y'all deal with secrets in your config files? Or has that not come up?

Minimalist approaches like that sound good to me, but the secrets issue is what pushes me towards other solutions (thinking particularly of my `.muttrc` file)

@codesections @kensanata @chozron I have a .gitignore for some files, but I never had to hide individual lines in a file.

@codesections @trawzified @kensanata my secrets are in pass, which is local only.

passwordstore.org/

Other than that, I also have a .sh_local included in .zshrc, which is kept out of git. Although, there's not much in it.

@codesections @trawzified @kensanata

Regarding mutt, you can use variables in a separate file that start with my_.

For example:
set my_username = "..."
set my_password = "..."

This file could be gpg encrypted (or pass).Then, in your muttrc you would include it:

source "gpg -dq $HOME/path.gpg |"

And use the variables $my_username... in the muttrc.

@codesections I use stow, with all dotfiles in a git repo. I have also considered using the git --bare method.

@codesections I can’t imagine why one would need a special-purpose tool to manage their dotfiles. Just Git!

git.danielmoch.com/dotfiles

@codesections
Never thought about that. My entire $HOME is part of borgbackup.

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.