I’ve always done this with overlay filesystems and repackaged configs.
SystemImager and rsync modules did what Kickstart and CFEngine could not: take me from COTS to Custom in this lab or one in another country.
Kiwi did a pretty good job for a bit, but locked you to SUSE.
Nix seems like a runtime environment rather than an OS, but I haven’t spent the sweaty hours with it that I have the others.
Ansible and Debian work equally well on a laptop VM, Cloud Provider or colo rack.