I need to understand the mechanism on why this redownloaded everything.
I used the now quite old link
https://web.archive.org/web/20160327190212/http://anderspapitto.com/posts/2015-11-01-nixos-with-local-nixpkgs-checkout.html
as reference to switch from normal NixOS channels to a git clone of nixpkgs.
I modified it for recent changes (since the old nix-channels git is gone), so essentially all that is needed was:
cd /etc/nixos
git clone https://github.com/nixos/nixpkgs
cd nixpkgs
git checkout nixos-24.11
then in /etc/nixos/configuration.nix:
# here specify parent folder
nix.nixPath = [ "/etc/nixos" "nixos-config=/etc/nixos/configuration.nix" ];
then
nixos-rebuild switch
… now the entire thing is still running hours later because it’s redownloading about 33GB worth of sources since I have system.includeBuildDependencies = true;
set, but it’s also redownloading base stuff.
So going by the commit hash on status.nixos.org:
nixos-24.11 a day ago 9684b53175fc
the commit from the local git clone was the same as the channel I was on (the default stable). Yet, it redownloads a ton of files as if all the derivation hashes had changed. Note that I’m using only binaries on this system (even though the sources are made to download).
Does anyone know why this switch would produce a massive redownload of store paths/sources? What is it about this switch that invalidates the prior downloads done via regular channel, when it points to the same commit?
I figure the article is quite old and maybe someone has run into it since.