nixos: remove allowSubstitutes = false from core modules#221041
nixos: remove allowSubstitutes = false from core modules#221041lovesegfault wants to merge 1 commit intoNixOS:masterfrom
Conversation
These are used almost anywhere, and make building only uncached parts of a NixOS system extremely annoying. They all already have `preferLocal = true` set, which should be enough to prevent them from being built remotely, where the largest perf hit would be seen.
|
Another idea would be a config to |
|
I made another PR with the config-based approach here: #221048 |
|
I don't understand what's annoying about not using substitutes for these? Surely, spending the milliseconds it takes to create a trivial file is preferable to reaching out over the network, especially considering how unreliable networking can be. Especially considering debugging network connectivity problems is likely to involve tweaking systemd units directly or indirectly, so you wouldn't want these attempting to reach out to a substituter. |
It means your CI is always having to fetch everything it needs to build these, instead of them being properly cached. It's extremely annoying because it balloons the build time of seemingly minor system changes by causing hundreds of paths to be fetched just to build a text file that was already built and cached previously. |
Description of changes
These are used almost anywhere, and make building only uncached parts of
a NixOS system extremely annoying. They all already have
preferLocal = trueset, which should be enough to prevent them from being builtremotely, where the largest perf hit would be seen.
Alternatively, we could introduce a top-level config option to NixOS like
substituteTrivialDerivationsto let users toggle this behavior.IMO, these derivations produce tiny files, and fetching them from a substituter
is probably not significantly worse than building them locally.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)