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
system/boot: add includeDefaultModules option #111452
system/boot: add includeDefaultModules option #111452
Conversation
The change looks good to me.
It's probably a good time to remove them. |
eee6aeb
to
c5ca243
Compare
Hah, that's an impressive age. If this list of modules survived 12+ years, it's probably here to stay. 😅 I removed the comment now. |
@rnhmjoj: this PR should be ready to go now. |
Can you keep the comment? I'd like to try removing some of the modules in another PR: unlike 12 years ago there are tests for the installer and initrd that can help testing this change. |
c5ca243
to
95df164
Compare
No problem, the comments are back. @rnhmjoj, please take another look. |
95df164
to
2c769d7
Compare
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.
The diff looked already good. I just run a bunch of initrd tests, with and without includeDefaultModules
, and all seems well.
Motivation for this change
I am trying to build NixOS for Raspberry Pi 3 with
boot.kernelPackages = pkgs.linuxPackages_rpi3
(this is needed to support dt overlays and Python GPIO libraries as the mainline kernel doesn't support these yet).It turns out that
linuxPackages_rpi3
doesn't come with a lot of kernel modules that are added by NixOS configuration by default (see below for a detailed list of missing modules [1]). This means that the NixOS build fails with the following error:This change allows us to omit the default modules and add just those that are provided by the platform-specific list of supported kernel modules.
Things done
I have built an SD image with this change and verified that it boots on a Raspberry Pi 3B (I was able to ssh into it and run my regular services on it).
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)[1] The list of missing modules in the RPi3 kernel: