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
nixos/boot: add option to disable initrd #80114
Conversation
would it make sense to create the enable option in |
@GrahamcOfBorg test boot boot-stage-1 |
You are right, it makes more sense there. |
@GrahamcOfBorg test boot boot-stage-1 |
nixos/modules/system/boot/kernel.nix
Outdated
@@ -187,7 +187,7 @@ in | |||
|
|||
###### implementation | |||
|
|||
config = mkIf (!config.boot.isContainer) { | |||
config = mkIf config.boot.initrd.enable { |
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.
is there any particular need to disable this config based on boot.initrd.enable
? Everything related to initrd will be disabled in that case, why disable rest?
For example, system.build.kernel
, boot.kernelParams
, hardware.firmware
are irrelevant to initrd, right?
cc also @acertain to explain usecase.
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.
Yeah, it seems we have to separate the container from initrd logic somehow.
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've split the the configuration in two sections and used mkMerge
. I'm not so sure if this is 100% correct.
Thank you for the review! |
I guess it should be safe enough, it's been a month and no reported issues. |
While I agree that it should be safe enough, doing this on account of Mobile NixOS alone shouldn't be the deciding factor. Right now, to reduce complexity, it is expected that Mobile NixOS is built against the ever-evolving nixos-unstable channel. I do not know if there are other incompatibilities with 20.03, and do not try to keep it backward compatible for now. Though, with that said, if there are incompatibilities, it would be fine if contributions can be provided, conditional on the imported nixpkgs revision. I am ±0 with backporting for Mobile NixOS, -1 for backporting a change in NixOS past the freeze. Though with that said, this change is pretty self-contained and safe. So maybe +1 as far as risk goes (where +1 is not risky at all). |
|
Motivation for this change
Fix issue #6520
Things done