-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
darwin.linux-builder: Disable evaluation #268574
Conversation
A remote builder does not need to evaluate anything, so let's trim it down to (eventually) save some space, and make the purpose of the builder clear. Users should evaluate on the host instead.
These won't cause anything to appear in toplevel.
Successfully created backport PR for |
Now that the underlying darwin.linux-builder doesn't [support evaluation](NixOS/nixpkgs#268574) it doesn't make sense to do as much local configuration/testing that requires root.
environment.extraSetup = '' | ||
rm --force $out/bin/{nix-instantiate,nix-build,nix-shell,nix-prefetch*,nix} | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My linux-builder
has gotten into a bad state and removing these commands makes it very hard to debug the situation
@roberth I wonder if it's better to revert this section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which commands do you need to run?
Would an opt-in option be sufficient for your purposes? Something like:
environment.extraSetup = '' | |
rm --force $out/bin/{nix-instantiate,nix-build,nix-shell,nix-prefetch*,nix} | |
''; | |
environment.extraSetup = mkIf (!cfg.nix.evaluator.enable) '' | |
rm --force $out/bin/{nix-instantiate,nix-build,nix-shell,nix-prefetch*,nix} | |
''; |
Currently it's meant to simulate a store-only nix
, so there's little benefit to this code as is, except manage expectations when we can reduce the linux builder's closure by only incorporating a store-only build of nix
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to run something like nix build --rebuild
so ideally the nix
command
If I'm understanding correctly, the default would be to include the nix
command, which would be my preference as otherwise if your linux-builder
gets in a bad state, it might be quite annoying/hard to bootstrap another one rather than be able to potentially fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it might be quite annoying/hard to bootstrap another
I thought it was basically fully automated, except for clearing it.
Anyway, not being able to debug it properly is annoying, so I'm ok to revert this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even the clearing is automated, too (we set min-free
and max-free
), but it might still be worth restoring the nix
command-line tools for debugging purposes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was referring to bootstrapping my own Linux builder locally, but I realize now that if you just comment out any custom configuration (if you're using nix-darwin) and use a cached Linux builder from Nixpkgs that should work fine
I've made a PR here: #347205
Description of changes
A remote builder does not need to evaluate anything, so let's trim it down to (eventually) save some space, and make the purpose of the builder clear.
Users should evaluate on the host instead, if they aren't already.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)