WARNING: USE AT YOUR OWN RISK!!! THIS SCRIPT IS UNMAINTAINED, NOT CONSIDERED STABLE, AND CAN BREAK YOUR SYSTEM!!! YOU HAVE BEEN WARNED!!!
Installing Nix is easy peasy, run a single command and you're ready to go.
But uninstalling it? Good luck hahahahahah!!!! You can try running the install program again and it will tell you what to do, but it is not quite complete. The best effort so far seems to be the uninstallation guide documented at: https://nix.dev/manual/nix/2.22/installation/uninstall
This gist contains two bash scripts tested a couple of times on macOS Sonoma running on Apple Sillicon with Nix 2.23.0. They are both based in the official macOS guide linked above with the intention of creating a "one command uninstall" experience that you might expect.