Nix: display download progress while doing nixos-rebuild

Created on 6 Mar 2018  路  7Comments  路  Source: NixOS/nix

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)

Most helpful comment

As a workaround, do nix build --no-link -f '<nixpkgs/nixos>' config.system.build.toplevel to actually build the system before running nixos-rebuild.

All 7 comments

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?
Example

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rrnewton picture rrnewton  路  34Comments

lilyball picture lilyball  路  67Comments

pjotrp picture pjotrp  路  37Comments

edolstra picture edolstra  路  96Comments

edolstra picture edolstra  路  49Comments