NixOS is neat.
And "OS setup from git repo" is something NixOS is excellent at.
However, the effort it would take for you to come up with your own NixOS configuration would be much greater than what it would take for you to just re-configure your system each time & keep notes (or write the commands down as scripts).
I think the dissuading points under "Should I use NixOS?" are pretty good. https://github.com/hlissner/dotfiles#frequently-asked-questi...