Auto-update packages in buildEnv declarated in nixos


#1

I want to install python with some packages globally, and then I find python3.withPackages and buildEnv.

But I find that nix-env cannot update the packages in it automatically because it only compares python3’s version. And I find a option with upgrade named -leq which can do what I want to.

Now, If I declarate it in environment.systemPackages, how to let nixos-rebuild to update packages in it?
And how to let nixos-rebuild to update packages defining in bundlerEnv(ruby) automatically?
And how to let nixos-rebuild to update packages defining in buildEnv automatically?


#2

I find that nixos-rubild using nix-build to rebuild the system not using nix-env, so buildEnv declarted in configuration will be built/upgraded everytime rebuild system