@jeeves I never used Nix, but for at least one decade, the trend across all distros has been towards stateless root filesystem and removing those pesky post-install / uninstall scriptlets.
The oldest mechanism is triggers: https://wiki.debian.org/DpkgTriggers
The .d directory idiom eliminated tons of sketchy scripts that edit etc files.on package installation.
Then came systemd, which eliminated all those distro-specific scripts to enable and disable daemons.
Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.
All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.