Why did this happen, should it happen and could we do better?
Of course the configuration changes with the above lines of config. But I don’t think any packages need to be rebuilt (I only guess that the config changes don’t influence any dependencies).
But as it looks many dependencies need to be fetched all over again. I don’t think anything gets built the second time - but just having to be refetched again while the configuration builts again is in itself most of the time spent builting it. Both times this took few minutes on my computer.
Did something went wrong? Is there more changes that I brought with the changed config lines? If not then still - Can we do better in terms of more gradual configuration build steps, more checkpoints - resulting in better caching?
of course, thats the flake, though the change got swallowed by a single commit, its concerned with file nixos/barplus-hardware.nix.
I think there’s nothing special in the flake, instead I would suspect that the way configuration is calculated there’s no derivations created that would act as a cache checkpoint along the way, but instead it gets calculated as one big chunk. Does it make any sense?
Huh? That doesn’t sound like how this works, though I’m having trouble understanding your suspicion.
A NixOS configuration is just a derivation. Derivations share the parts they have in common. This isn’t a “cache checkpoint” problem. When you change your Nix expressions, you make a new NixOS config, but this new config shares everything that’s unchanged from the last config. It’s accomplished with cryptographic hashing, kind of like a merkle tree; not with some kind of cache invalidation strategy.
Just to make sure we’re on the same page… You’re using nixos-install --root /run/media/zmrocze/barplus because you’re installing to a different drive than you’ve booted, right?
Just to make sure we’re on the same page… You’re using nixos-install --root /run/media/zmrocze/barplus because you’re installing to a different drive than you’ve booted, right?