By: Greg Pfeil <greg@technomadic.org>
Replace the profile’s contents in one generation `nix profile` requires one generation to clear the profile and another to add the packages. `nix-env --set` can replace the contents in one generation, but it’s a “legacy” command. NixOS and Home Manager still use `nix-env` because of this issue (NixOS/nix#6349).