Actually that is exactly what I’m looking to do for my upcoming home server - configure and define everything via NixOS so that I can almost instantly reprovision it should I have to (restore from backup on hardware issues, recover from borked software upgrades, etc).
Setting up solid backups is important to me, so I plan to bake the full setup into the configuration. That allows me to test everything in a VM first and then apply it all with a simple GIT fetch and rebuild once I commit to hardware.
It’s aspirational so far, but the more I read the more sense it makes to me. My own desktop won’t be far behind if all of that works…
Window -> Mint -> Mint Debian -> Arch -> NixOS (not complete yet)
I am incredibly happy with NixOS, I love having my entire OS and software configuration in a GIT repo, commits and comments included.