-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
ci: add github action to evaluate nixos options #360876
base: master
Are you sure you want to change the base?
Conversation
-I ./. \ | ||
--option restrict-eval true \ | ||
--option allow-import-from-derivation false \ | ||
-A options |
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.
Here's what that builds:
Line 150 in df0a5e3
options = (buildFromConfig ({ ... }: { }) (config: config.system.build.manual.optionsJSON)).x86_64-linux; |
I do wish that line were hoisted here, rather than being referred to as "option". It's more clear that we're building the NixOS manual's JSON representation as a proxy for loading all the modules and evaluating them.
Known things it misses: evaluating all the expressions that trigger when the module's enable option is set, for instance.
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.
NixOS manual's JSON representation as a proxy
Isn't that practically the same as building the nixos manual? We already have a gh action for it I believe.
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.
Yes, it is.
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.
@JohnRTitor there is one difference I believe. We could have optionsJSON also in staging because it doesn't require stdenv, whereas the manual might causes long rebuilds.
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.
Ok, but can we also build the aarch64-linux ones?
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.
Unsure if this is possible on x86_64. Does this make a big difference?
Things done
Unlike the manual we should be able to build this in staging as well.
Mic92#43
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/
)Add a 👍 reaction to pull requests you find important.