I use many different networks (with VPN/with proxy/with multiple routing tables/ per table rules/very lossy ones) and as such often meet network problems. Downloading a huge package from the cache while doing a nixos-rebuild can take a long time and without feedback can be a bit stressful. I wish nixos-rebuild could show some kind of progress in network speed or percentage, just to show it isn't stuck.
Instead of having
copying path '/nix/store/1fd29bwafkdacskmisn1k9dj8vhd4yfk-nix-2.0pre5968_a6c0b773-man' from 'https://cache.nixos.org'...
copying path '/nix/store/7bfc02z2ayj9h73qwyrbnnzy14xgrazn-nix-2.0pre5968_a6c0b773' from 'https://cache.nixos.org'...
copying path '/nix/store/2zd1y9iij37z72ah97xmalq8j8hqq8mi-nixos-rebuild' from 'https://cache.nixos.org'...
we could have
copying path '/nix/store/1fd29bwafkdacskmisn1k9dj8vhd4yfk-nix-2.0pre5968_a6c0b773-man' from 'https://cache.nixos.org'... [32/45 MB] (that's a huge man :D)
As a workaround, do nix build --no-link -f '<nixpkgs/nixos>' config.system.build.toplevel to actually build the system before running nixos-rebuild.
nix build --no-link -f '
' config.system.toplevel
Thanks for the tip! Looks like it should be config.system.build.toplevel FWIW, mostly mentioning so I don't forget if this doesn't make it into a script/alias/something before then :).
Indeed, my bad. (fixed)
@lheckemann Could you please explain what (160.0/1044.9 MiB) means in the below picture?

That's the uncompressed size.
Since some time my internet connection is limited I also ran into that issue. From a users perspective who is upgrading the system sometimes quite unclear if there's still some action or download hangs.
My 2c here, I am on an unstable connection in indonesia, and having come from a stable one last week, I can tell you it's like going from a working operating system to a broken one. NixOS sits there sometimes for far too long on packages and I have no idea if they've hung or not. It's taken all night just to rebuild. I highly, highly think a progress meter isn't just a nice to have, it's critical functionality when you need it.
Most helpful comment
As a workaround, do
nix build --no-link -f '<nixpkgs/nixos>' config.system.build.toplevelto actually build the system before running nixos-rebuild.