How does nix-env -u know when not to apply version updates?

nix-env -u won’t downgrade a package, even if the newer version package is no longer longer available (or is shadowed by prios).

I can’t remember the name right now, but IIRC that’s a similar but unrelated system.

It’s pretty much the same workflow as for NixOS, which works fine for me (though it did take some getting used to). I expect this will be fixed when/if nix-env is merged into nix (which has replaced package names with attributes, removing the need for the prio system at all).

There is also Declarative package management for normal users - #2 by Mic92 which manages the meta-package for you.