💾 Archived View for gmi.bacardi55.io › blog › 2020 › 03 › 18 › managing-my-dotfiles-with-yadm captured on 2023-01-29 at 02:50:32. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Managing my dotfiles with Yadm

Posted on 2020-03-18

This will be a very short post about Yadm[1], « Yet another dotfiles manager», that shines by its simplicity and efficiency :-).

1: https://yadm.io/

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[2]). A very good idea in my opinion as it really speed up my new laptop[3] setup :).

2: https://www.pine64.org/pinebook/

3: /posts/2020/03/15/buying-linux-laptop/

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 the scene 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.

Installation

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

4: https://yadm.io/docs/install

Usage

First, you need to initialize your repo, like you would do with git[^1]:

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

For more usage information, see the yadm[5] website!

5: https://yadm.io/

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[6], with some specific config file for my Pinebook[7] running Archlinux[8] (without X by default) like .asoundrc##Linux.raven or .xinitrc##Linux.raven

6: https://gitlab.com/bacardi55/yadm-dotfiles

7: https://www.pine64.org/pinebook/

8: https://www.archlinux.org/

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[9] for more explaination :)

9: https://yadm.io/docs/alternates#

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^^).

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

/gemlog/

Send me a gemini mention

send me an email!