A rolling back mechanism is the best thing to have for server tweaks. I achieve the same with docker. Something similar might be possible with FreeBSD Jails, podman, or anything similar like that. (Not that NixOS is a bad choice, I just wanted to share some more options for anybody looking for some to try.)
🤫🤫🤫