3 ms·
So this probably just saved me a trip down NixOS road, which was on my (ever too long) todolist for some time now. Last year, I finally put my private systems
by majewsky 10y ago
So this probably just saved me a trip down NixOS road, which was on my (ever too long) todolist for some time now.
Last year, I finally put my private systems under configuration management, but just like the author, I was concerned that both the configuration management tool and the system package manager like to exert complete authority over the system without knowing about each other, a recipe for disaster.
In the end, I wound up writing my own configuration management tool, Holo [1], which relies on system packages to install applications and deliver configuration files, and implements the additional logic to provision things that the package manager does not understand (users, groups, SSH keys, etc.).
One thing that's missing from Holo right now is a validation pass that the whole system matches the expectation described by the configuration packages. (Right now, only files that were touched by Holo can be monitored for changes, but not files installed by the package manager.)
But it turns out that that's a hard problem. A normal Linux system has a lot of moving parts that are not accounted for by the system package manager. See for example the positively huge list of exceptions in [2]. Of course, the bulk of these quickly-changing files are data, which can be skipped easily by just ignoring /run, /tmp, /var/cache, /home and so on. The question remains what to do with the rest: implement some sort of parsing for auto-generated configuration like /etc/passwd, /etc/ssl/certs and so on, or just rely on snapshots of known-good states designated by the administrator? I'm still undecided.
[1] http://holocm.org http://holocm.org (the site seriously needs an update)
[2] https://github.com/graysky2/lostfiles/blob/master/lostfiles https://github.com/graysky2/lostfiles/blob/master/lostfiles