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
Fix kernel configuration merge #84032
Conversation
Addresses NixOS#71803: Kernel options are not merged as described, especially the "optional" aspects. The error silences legitimate warnings.
With the fix in kernel configuration merging, some kernel configuration items marked as mandatory now correctly trigger an error when unused (while they previously were unused).
should this target staging? |
done |
This doesn't seem to fix |
The warning for INET_TCP_DIAG already occurs on nixos-unstable. The way I see it, it should have triggered an error (and now would thanks to this PR, I changed the config to |
would like to merge this since it fixes a non-obvious bug CC @NeQuissimus |
Some of the options didn't have correct kernel version constraints, others had been removed or made optional unnecessarily in NixOS#84032.
Motivation for this change
Things done
Fix #71803
Was a bit tougher than expected because I misunderstood how mkMerge worked. I thought using submodule would create the missing fields in attribute sets but it doesn't.
The fix made apparent that some configuration entries in common-config.nix are unused.
As it may depend on kernel version, I marked the entries optional. It felt less likely to break builds than plainly removing them (but removing them could be the correct thing to do).
I improved the tests and made them more readable.
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)