That should be more modern then the manual entry.
It actually allows to reference the "current" package states, e.g. from
other overlays with applied patches.
Installation is now not different from any other derivation:
nix-env -i my-packages
Follow Thibaut advice, see: https://mamot.fr/@Thib/107717286778025122
and following posts
This allows to have a list the current installed set of derivations.
Instead of using nix-env like apt.
Use `nix-env -i -f configuration.nix` to install this derivation.
It will then install defined "packages".
This eases to maintain current system and port to NixOS or something
else in the future.