I have installed nixos on VirtualBox and I was experimenting and made some few mistakes so I just want to know how to reset nixos in VirtualBox.
You’re probably looking to rollback. You should be able to nixos-rebuild switch --rollback
and if it no longer boots, you can select an older generation from the bootloader.