-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preferLocalBuild should not override max-jobs=0 #3810
Comments
I would be fine just changing the behavior of
To be clear, is this a daemon thing in particular? What happens if one is not using the daemon, but has remove builders? |
Same behavior :). |
OK whew. That would have made back-compat much more tricky. |
One reason the user might be using remote builder / binary cache is to avoid HDD space pollution and there's no way to disable that. |
I'm one of those Nix beginners that was just bitten hard by So we followed https://docs.nixbuild.net/getting-started/ and After 6 hours of trying to figure out why |
I've been burnt by this in the past as well. |
I wonder however what does |
This resolves #3810 by changing the behavior of `max-jobs = 0`, so that specifying the option also avoids local building of derivations with the attribute `preferLocalBuild = true`.
Is your feature request related to a problem? Please describe.
The documented behavior of
max-jobs
defines that even with a value of 0, builds withpreferLocalBuild = true
still build locally. This is a fairly major policy decision that the daemon makes on behalf of the user, and is a decision the user cannot easily override.Sometimes a machine should perform absolutely no builds, in which case their options to fully disabling builds is to either delete all the build users (not sure nix-daemon would be happy with this) or set the
system
to a bogus value and assume/hope nobody will use it.Describe the solution you'd like
I propose we extend the
features
feature of remote building to local building, too, and use preferLocalBuild as a listed feature.Concretely, I want to:
nix.conf
to accept amandatory-features
optionpreferLocalBuild == true
as if they had the "local-preferred" featurelocal-preferred
to the default value ofsystem-features
Backwards Compatibility
max-jobs=0
can be achieved by settingmandatory-features = local-preferred
andmax-jobs=auto
.max-jobs=0
and assign thelocal-preferred
feature to a specific builder which is nearby.The text was updated successfully, but these errors were encountered: