NixOS:master
← lovesegfault:always-allow-substitutes
opened 02:59PM - 14 Mar 23 UTC
# Motivation
This adds a new configuration option to Nix, `always-allow-subst…itutes`,
whose effect is simple: it causes the `allowSubstitutes` attribute in
derivations to be ignored, and for substituters to always be used.
This option should be a good middle-ground, since it doesn't imply
rebuilding the world, such as the approach I took in
- https://github.com/NixOS/nixpkgs/pull/221048
See Also:
- https://github.com/NixOS/nix/issues/4442
# Context
This is extremely valuable for users of Nix in CI, where usually
`nix-build-uncached` is used. There, derivations which disallow
substitutes cause headaches as the inputs for building already-cached
derivations need to be fetched to spuriously rebuild some simple text
file.
# Checklist for maintainers
Maintainers: tick if completed or explain if not relevant
- [ ] agreed on idea
- [ ] agreed on implementation strategy
- [ ] tests, as appropriate
- functional tests - `tests/**.sh`
- unit tests - `src/*/tests`
- integration tests - `tests/nixos/*`
- [ ] documentation in the manual
- [ ] code and comments are self-explanatory
- [ ] commit message explains why the change was made
- [ ] new feature or incompatible change: updated release notes
# Priorities
Add :+1: to [pull requests you find important](https://github.com/NixOS/nix/pulls?q=is%3Aopen+sort%3Areactions-%2B1-desc).