I have a metered data connection so I must conserve bandwidth and consider what to download carefully.
After updating my flake.lock
, sometimes I must download a lot of stuff to complete the update. Rather than finding out after-the-fact, I want to see the required download size before spending much bandwidth. Is there a nixos-rebuild
option for this or any other way to find out?
1 Like
There’s dry-run
but it doesn’t have size info.
Yeah, good point. Do you know if there’s any other data I could cross-reference those paths with to find out the size of each item?
--log-format bar
or --log-format bar-with-logs
display expected download size in the bar while building. this flag is supported by nixos-rebuild
too
2 Likes
Fantastic! For reference, it looks like this:
$ nixos-rebuild dry-build --log-format bar-with-logs
building the system configuration...
these 36 derivations will be built:
/nix/store/dm96z1v95a96vkbvrlg7g32bf853n3cr-system-path.drv
#
# -- snip --
#
these 4 paths will be fetched (34.04 MiB download, 135.16 MiB unpacked):
/nix/store/477fy383kb2w6dck1zv1g7j18d1hblvi-fractal-10.1
/nix/store/746xbcfs67iw6qpm0k226k28nb9iflf7-imagemagick-7.1.1-47
/nix/store/sia7mkbc7hqwl271fcagpa7w91pk6102-kitty-0.41.1
/nix/store/pbqh8sgahb71w0vs9jlks8gs3bjy22mg-kitty-0.41.1-terminfo
2 Likes