Skip to content

feat: add boot.kernel.sysctl and boot.kernelModules#384

Open
yuxqiu wants to merge 4 commits intonumtide:mainfrom
yuxqiu:improve-boot
Open

feat: add boot.kernel.sysctl and boot.kernelModules#384
yuxqiu wants to merge 4 commits intonumtide:mainfrom
yuxqiu:improve-boot

Conversation

@yuxqiu
Copy link

@yuxqiu yuxqiu commented Mar 6, 2026

Implement #382 and make boot more extensible. To maintain backward compatibility and ensure the tests pass, boot.kernelPackages.kernel.version is also stubbed. Some potential side effects are: if users import other modules that access additional boot attributes downstream and those are not stubbed in this PR, they will need to provide stub values under boot themselves.

@yuxqiu yuxqiu marked this pull request as draft March 6, 2026 12:19
@yuxqiu yuxqiu force-pushed the improve-boot branch 2 times, most recently from e0412d6 to 86089ea Compare March 6, 2026 13:26
@yuxqiu yuxqiu marked this pull request as ready for review March 6, 2026 13:37
Copy link
Member

@jfroche jfroche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these new options. If you manage to use the upstream docker module based on this, do not hesitate to upstream the required changes to related module or just a test that validates that the module works well.

{
boot = lib.mkOption {
type = lib.types.raw;
boot = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problems is that we now implement a subset of the boot options. It doesn't cost us a lot more to stub more of boot options here. Maybe we should just copying the options defined in https://github.com/NixOS/nixpkgs/blob/80bdc1e5ce51f56b19791b52b2901187931f5353/nixos/modules/system/boot/kernel.nix) ? I guess importing that upstream file directly would have been a problem ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think importing it directly wouldn't give us much benefit anyway as a lot of those options don't really make sense in our context, and we'd still need to define extra stubs to make everything work properly.

@yuxqiu yuxqiu requested a review from jfroche March 7, 2026 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants