Skip to content

πŸ”§ My dotfiles & some useful scripts πŸ›

License

Notifications You must be signed in to change notification settings

mate-amargo/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ae0755d Β· Jan 14, 2025
Jan 5, 2025
Jun 29, 2021
Sep 19, 2024
Jun 1, 2021
Nov 18, 2021
Sep 19, 2024
Mar 14, 2023
Dec 4, 2023
Oct 28, 2024
Jun 2, 2021
Jun 16, 2021
May 10, 2022
Jun 6, 2021
Mar 21, 2024
May 12, 2022
Jun 7, 2021
Apr 12, 2024
Aug 8, 2023
Nov 5, 2024
Jun 2, 2021
Apr 7, 2024
Aug 7, 2023
Jun 2, 2021
Jan 14, 2025
Jun 1, 2021
Aug 18, 2023

Repository files navigation

dotfiles

πŸ”§ My dotfiles & some useful scripts πŸ›

The files are managed nicely by yadm.

Installation

Specify the main branch:

yadm clone -b main https://github.com/mate-amargo/dotfiles.git

After that, remember to decrypt the files:

yadm decrypt --yadm-archive ~/.local/share/yadm/archive

Usage

Basic stuff

Just use yadm as if it were git.

vim ~/.newconfig
yadm add ~/.newconfig
yadm commit -m "Useful commit message"
yadm push

Use a different user for commits

If you have different user sections in your gitconfigs for your different machines, use the following to tell yadm which user to use:

yadm gitconfig "user.email" "alternate-email@domain"
yadm gitconfig "user.name"  "Alternate Name"
yadm gitconfig "user.signkey" "ALTERNATE_KEY_FINGERPRINT"
yadm gitconfig "user.signingkey" "ALTERNATE_KEY_FINGERPRINT"

Alternates

There are various ways of using alternate files. But I find that using the class system works best for me.

You can set the class with (for example home):

yadm config local.class home

To query the current class just don't pass the last argument

yadm config local.class

If you want to use alternates just add them to ~/.config/yadm/alt and commit that file and not the created symlink.

For example:

vim ~/.config/yadm/alt/.config/fish/config.fish\#\#class.home
yadm add ~/.config/yadm/alt/.config/fish/config.fish\#\#class.home
yadm commit -m "Add fish config for home class"

This will create a symlink from ~/.config/fish/config.fish pointing to ~/.config/yadm/alt/.config/fish/config.fish##class.home

Encryption

To use encryption first add the path to the sensitive file to the archive ~/.config/yadm/encrypt and then use yadm encrypt to generate the encrypted file ~/.local/share/yadm/archive and add that one to the repo too!

For example:

vim ~/.config/my_sensitive_config
echo '~/.config/my_sensitive_config' >> ~/.config/yadm/encrypt
yadm add ~/.config/yadm/encrypt
yadm encrypt
yadm add ~/.local/share/yadm/archive
yadm commit -m "Add sensitive config as encrypted file"