So, some times ago I had this question https://feddit.it/post/22496010 about how to manage my system configuration, storing it on a repository or something.
Many people recommended using ansible to manage the system as a whole, but my system was already up and running, what I wanted instead was something to move around files while fixing up their permissions, so I build a python script for that.
The script grew more refined as time went on, and so now I’m publishing it so anyone can use it.
p.s.: this script is purely python and has no external dependencies!



What speaks against soft linking with for example GNU stow?
That is a good question. I have considered using gnu stow before building this. But there’s a couple of problems with that.
Git doesn’t follow symlinks, it stores them as links in the repo, so your only option is to keep the files in the repo, and symlink from the config file location to the repo. This is fine for user config files (like from your .config folder), but if you want to keep system config files (like those from /etc) then the git process needs to run as root to modify those files, because symlinked files share permissions and ownership. And even then, git will always create everything as root because it only tracks permission bits, not ownership, so you will need to constantly fix up ownership of your files.
With this tool instead you explicitly tell it the ownership and permission of files, and it takes care of that for you (it still needs root permissions of course).