What to use for dotfiles management?

I am looking for a better way to manage and sync my dotfiles between machines. Some options I am looking at include dropdot, or a bare git repo, or GNU stow. Currently, some of the machines have some dotfiles symlinked to git repos, and others are unmanaged.

What do you guys use for managing dotfiles? Any suggestions?

Local install of GitLab on a VM, and a basic git repo.

I like to KISS, and git is a workflow I’m already familiar with.

3 Likes

Do you have your $HOME as a repo? Or symlink the files to the repo? Or something else?

No, I basically keep a ~/.scripts directory that has little snippets that act on my home directory when invoked.

Such steps might be:

  • git clone code.localdomain:dotfiles ~/src/dotfiles
  • cp -r ~/src/dotfiles/config ~/.config

This way, I can always blow away my home directory and revert or restore in a repeatable way when I reinstall or add a new machine.

I keep different sets of configurations in different repos. I need different configurations for different machines, and only clone the repos needed for that machine.

1 Like

I use git too for every script, tools and configuration. Branches for versioning. Readme.md for every repo with notes, install commands and the like.

3 Likes

I do something similar but I have an install script that gives me a little more fine grain control. Although I probably need to just move everything into my .config directory and be done with it…

1 Like

If you just care for backup and restore have a look at timeshift. It can backup your root installation and dotfiles in your home easily using rsync in the background. It can also do scheduled backups and you get safety bonus points if you use the package timeshift-autosnap which does backups before every system upgrade and package installation.

It is more for syncing/transfer between systems, so timeshift is not really what I am looking for in this case. Thanks for the suggestion though.

I do use something like timeshift, so rsync + BTRFS reflink copies, for some of my backups.

I probably need to just move everything into my .config directory and be done with it…

My scripts do more than that, using .config was just an example of moving the checked out files into place.

You’ll miss a lot of settings only doing .config, as that seems to be a newer convention. Notable things that would be missed are Xorg settings, Firefox, and Thunderbird.

3 Likes

Applications not being compatible with XDG started to get really annoying as I am continuing to look into this more.

Applications not being compatible with XDG started to get really annoying as I am continuing to look into this more.

Opened 16 years ago. Status: Open

2 Likes

I’ve been using Subversion to version my home directory for longer than Git’s been around.

As far as I can tell Git is still lacking some of the features that make this really convenient with Subversion. Come to think of it this also probably is one of the few valid uses for externals… :wink:

2 Likes

I just store my dotfiles in Nextcloud instance and have symlinks to them. Very much like git, also has versioning, but is a lot more versatile for other things and I already used it every day, made sense not to create another thing to manage in my life.

1 Like

yadm what I use.

yadm add ~/.config/mpd/mpd.conf

yadm commit -m "mpd now looks in proper music dir"

yadm push

2 Likes

Nice. I was considering yadm


To update the thread, I am trying out chezmoi, which I picked over other tools because it has built in support to store passwords in Bitwarden, and because it has windows support.

1 Like

Hmmmm I’ll have to look at that.

1 Like