| 28 Nov 2024 |
Leonardo Santiago | *
wondering how many nixpkgs you are instantiating 🤔
should be just one, they're all using the same one.
| 13:21:44 |
Leonardo Santiago |
It also builds iirc
yes, but even with --no-build it's still painfully slow. it's the same default check, and most of the structure should be shared for all of them, it seems to me that nix must be re-evaluating a ton for it to take that much time
| 13:22:48 |
ElvishJerricco | In reply to @o-santi:matrix.org
wondering how many nixpkgs you are instantiating 🤔
should be just one, they're all using the same one.
Just because they're using the same nixpkgs flake input doesn't mean they're using the same nixpkgs instance. Each nixos config by default re-imports nixpkgs (re-evaluates it) so that it can apply its custom nixpkgs.* nixos options to the import | 13:36:58 |
Leonardo Santiago | hmm, but they should all be using the exact same nixpkgs.lib.nixosSystem call. is there any way to avoid re-evaluating nixpkgs? | 13:37:49 |
ElvishJerricco | right but each of those calls does (effectively) import ./. { /* ... */ } in the nixpkgs flake | 13:38:34 |