How to remove old NixOS generations in your system and bootloader

In this Nix tips, I am going to show you a few tricks to remove and avoid keeping old NixOS generations in your system and bootloader menu.