Why `copying /nix/store/xxxxx-source to store` with the same `flake.lock`

I have NixOS setup with flake.
For example, I do a nix flake update && nixos-rebuild switch --flake . a week ago.
Then one week later I do a nixos-rebuild switch --flake . with the same flake.lock generated a week ago, it would produce a lot of these message:

copying '/nix/store/xxxxx-source' to store...
copying '/nix/store/yyyyy-source' to store...
copying '/nix/store/zzzzz-source' to store...

Like this

And then it pull some new packages and update the system.

But why it pull some new package even though the flake.lock remain unchanged?

Probably because garbage collection deleted the local copies of those flakes in the meantime.

1 Like

It totally make sense!