Skip to content
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

Merged
merged 1 commit into from Mar 16, 2020
Merged

nixos/boot: add option to disable initrd #80114

merged 1 commit into from Mar 16, 2020

Conversation

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Feb 14, 2020

Motivation for this change

Fix issue #6520

Things done
  • Tested via one or more NixOS tests
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@danbst

This comment has been minimized.

Copy link
Contributor

danbst commented Feb 14, 2020

would it make sense to create the enable option in stage-1.nix instead?

@rnhmjoj

This comment has been minimized.

Copy link
Contributor Author

rnhmjoj commented Feb 14, 2020

@GrahamcOfBorg test boot boot-stage-1

@rnhmjoj

This comment has been minimized.

Copy link
Contributor Author

rnhmjoj commented Feb 14, 2020

would it make sense to create the enable option in stage-1.nix instead?

You are right, it makes more sense there.

@rnhmjoj rnhmjoj force-pushed the rnhmjoj:initrd branch from 85bf727 to e050d56 Feb 14, 2020
@rnhmjoj

This comment has been minimized.

Copy link
Contributor Author

rnhmjoj commented Feb 14, 2020

@GrahamcOfBorg test boot boot-stage-1

@@ -187,7 +187,7 @@ in

###### implementation

config = mkIf (!config.boot.isContainer) {
config = mkIf config.boot.initrd.enable {

This comment has been minimized.

Copy link
@danbst

danbst Feb 14, 2020

Contributor

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.

This comment has been minimized.

Copy link
@rnhmjoj

rnhmjoj Feb 14, 2020

Author Contributor

Yeah, it seems we have to separate the container from initrd logic somehow.

This comment has been minimized.

Copy link
@rnhmjoj

rnhmjoj Feb 15, 2020

Author Contributor

I've split the the configuration in two sections and used mkMerge. I'm not so sure if this is 100% correct.

@rnhmjoj rnhmjoj force-pushed the rnhmjoj:initrd branch from e050d56 to dea79b5 Feb 15, 2020
@danbst
danbst approved these changes Feb 16, 2020
@danbst danbst merged commit fab05f1 into NixOS:master Mar 16, 2020
13 checks passed
13 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@rnhmjoj

This comment has been minimized.

Copy link
Contributor Author

rnhmjoj commented Mar 16, 2020

Thank you for the review!

@rnhmjoj rnhmjoj deleted the rnhmjoj:initrd branch Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.