Managing my dotfiles with Yadm

Wednesday, March 18, 2020


This will be a very short post about Yadm, « Yet another dotfiles manager», that shines by its simplicity and efficiency :-). I decided a while ago to start managing my dotfiles with Yadm so I can share them between my main laptop and a recovery machine (a Pinebook). A very good idea in my opinion as it really speed up my new laptop setup :).

Why would one need a dotfiles manager?

Idea is simple, to version and backup them, to deploy them on new machine quickly, etc…

You could also simply do it via git manually (what Yadm does behind thescene anyway) or use tools to do so. There are many other alternatives available or specific workflow / bash script, but I found Yadm so easy to use (if you already know git commands) that I quickly loved it :)

Yadm - easy to learn and efficient dotfiles manager

I find Yadm to be a very easy to use yet very powerful dotfile manager. With it, I can easily manage files that will be reuse all machines, but as well defining some configuration file variation for specific OS (eg: linux) or for specific machine / hostname.


See the installation page for instruction. Most probably, there is a package available for your distribution.


First, you need to initialize your repo, like you would do with git¹:

    yadm init
    yadm add <files>
    yadm commit
    yadm remote add origin <url>
    yadm push -u origin master

For more usage information, see the yadm website!

If you want to have specific version of config files for a machine, just create the config file with the following name: <nameOfFile>##OS.HOSTNAME.

For example, you can see my dotfiles on gitlab, with some specific config file for my Pinebook running Archlinux (without X by default) like .asoundrc##Linux.raven or .xinitrc##Linux.raven

Then, Yadm will automatically create a symbolic link between the specific config file for this machine. Eg: if you have a .vimrc##Linux.raven and a .vimrc, on the machine named “raven” running linux, it will create a symbolic link ~/.vimrc to ~/.vimrc##Linux.raven. On other machine, it will use the default .vimrc file of my Yadm repository… Pretty neat, right? :)

Look at the documentation on alternate files for more explaination :)

I haven’t explored encryption yet as I’m paranoid and didn’t take the time to look at how it works yet, that’s why you see a .neomuttrc.tpl instead of a normal .neomuttrc with data encrypted (as well as because I don’t want to show some configuration/ports in there^^).

¹: If you are not familiar with git commands and concepts, I suggest you to read about it first before playing with Yadm^^.


If you find any issue or have any question about this article, feel free to reach out to me via email, mastodon, matrix or even IRC, see the About Me page for details.

My Home Lab 2020, part 2: GlusterFS Setup

My Home Lab 2020, part 1: Context and Architecture choices