I just wanted a quick Rust dev shell, so I ran
nix shell github:oxalica/rust-overlay
and while Nix was building the packages, for some time, all of the programs just froze (probably because the nix commands were using up 100% of the CPU). The same thing happens when running nixos-rebuild switch
or home-manager switch
after updating the flake. This was very annoying, as it means that my laptop is basically unusable while installing new Nix packages. Is there any fix / planned fix for this? Is there a way of limiting the concurrency / CPU usage so that all 8 cores do not get used for building packages at the same time?
I am using a laptop with i7-10610U
and 16GB
of RAM, so I think it would be a very smooth experience if the nix commands used just 4/8 cores instead of 8/8 cores.