Assumed Knowledge: make, GPG, git.

You can manage dotfiles with nothing but make and standard tools.

The Setup

Mine looks like this:

Standard configs are made with hard links, which means these two files are the same file:

Once you edit ~/.bashrc, that also changes dotfiles/home/bashrc. A make pattern takes care of the path, so there’s no need for dots in your dotfile manager.

Command-Based Files

Some files are usually created through commands, like ~/.gitconfig. These can change on different computers, as you add git lfs on one, or a credential helper on another. So if you don’t want to keep them in sync, you can just put the universal commands into a Makefile. If your name ever changes, then all computers receive that change, but nothing will touch the strange git helpers installed on that old laptop.

The same approach lets you manage secrets. For example, you can set the secret token value in glab (the Gitlab CLI tool):

Secrets Management

You can use pass to manage secrets with make. For example, to keep ~/.config/aerc/accounts.conf as a secret file, just throw it into pass:

Add this file as a secret, and make a rule to create these secrets from all the files in ~/.password-store/:

Handling Crontab

Changes in different computers’ crontab files can inflict a lot of merges. Avoid this by just making each set of tasks its own file:

Combine the lot with cat, then import this into cron:

Example Repo

You can find my basic setup here:

Or just clone the repo and see how it works: