As 2.14 and 2.15 have some troubles currently (which are especially recognizeable in channel based setupts), the nix attribute in all channels is currently pointing to 2.13.x as the "recommended version.
I would currently not suggest to use something newer then that.
nix-env -u nix though will evaluate the entirety of nixpkgs, and search for the “packages” which have the same “name” (not attribute name but drv name!) and compare their versions and will take the highest, that it understands as stable.
I do not know the details, about which version schema is applied for the comparison or when a version is considered a “pre-release”.
But thats why nix-env -u “works” to get the latest version.
Be aware though, that there might be even deeper and nuanced differences between the commands, depending on how the demon is started on your system.
As 2.14 and 2.15 have some troubles currently (which are especially recognizeable in channel based setupts), the nix attribute in all channels is currently pointing to 2.13.x as the "recommended version.
Makes sense! The thing is, I got 2.15.0 installed because I think that’s what the installer script installed. The download page seem to point at 2.15.0 as well.
So I’m not sure why is that, probably a miscommunication of some sort.
and search for the “packages” which have the same “name” (not attribute name but drv name!)
Oh. While I’m still quite new to this, I think it makes sense to me. Thanks.
Be aware though, that there might be even deeper and nuanced differences between the commands, depending on how the demon is started on your system.
Good to know. Any chance you have any source of reference to that? Sadly the nix-manual and man pages only offer very a brief explanation about nix-daemon and the install section doesn’t mention anything.
If I understand correctly, this means that generation one of my install had nix-2.13.3 and not 2.15.0 like I thought. So I guess somewhere along the way I upgraded to 2.15.0 by mistake and forgot about it.