Manage the home directory on multiple machines with some differences?

So, at the moment I have a pretty custom dotfiles setup, and I was looking for a solution to synchronize things from machine to machine. I like the idea of ​​having a ~ / dotfiles file (or similar) that contains a make file that handles creating symbolic links. Move the dotfiles file from machine to machine through rsync / unison / dvcs / whatever, and I'm ready to go.

The problem with this is because the files are slightly different on some machines, and I would like to track this. For example, my .xmobarrc (a panel application for those who are not familiar) has a configuration setting that displays battery life on my laptop, but not on my desktop.

What is the best way to manage files with machine differences like this, so that if I change something on one machine that should affect all machines, I can join together, and if I change on one machine, "Don't merge, it's Obviously, this requires DVCS, such as git, not rsync / unison / etc, but I'm not sure how to install it.

A master branch with one branch per machine that I merge / reinstall / cherry pick back and forth? It seems a little tedious. Is there a better way?

+4
source share
1 answer

One of the methods:

  • global configuration with all global parameters (if you change it and combine it, it will affect all machines)
  • one configuration file per machine (named, for example, after a machine crashes)
  • a script creating the final configuration file as part of the global and machine.

Given the mergers:

  • When you merge configuration files from one branch to another, you can merge everything (without cherry picking)
  • Or you do not always have to have a branch for each machine, since the configuration files on the computer already provide separation and allocation of these parameters (in different files instead of different branches).
+2
source

All Articles