about summary refs log tree commit diff
path: root/nixos/modules/system/boot/stage-1.nix
diff options
context:
space:
mode:
authorJanne Heß <janne@hess.ooo>2022-04-03 15:53:02 +0200
committerGitHub <noreply@github.com>2022-04-03 15:53:02 +0200
commit7cdc4dd5d1a2869d6e3c089f960ed6feae06ae77 (patch)
tree75022465e14ef14779c364a0c1578837ed9b29f1 /nixos/modules/system/boot/stage-1.nix
parent803c1abb38afa5037f9576796a32248d2a7ecbcf (diff)
parent7ebb4ebe404a7ecf6ee9761aab7d02cd4e2a4abc (diff)
Merge pull request #164943 from ElvishJerricco/systemd-initrd-reuse-systemd-module
initrd: Opt-in bare bones systemd-based initrd
Diffstat (limited to 'nixos/modules/system/boot/stage-1.nix')
-rw-r--r--nixos/modules/system/boot/stage-1.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix
index 8b011d91563f0..1bafec30b53d4 100644
--- a/nixos/modules/system/boot/stage-1.nix
+++ b/nixos/modules/system/boot/stage-1.nix
@@ -703,8 +703,12 @@ in
       }
     ];
 
-    system.build =
-      { inherit bootStage1 initialRamdisk initialRamdiskSecretAppender extraUtils; };
+    system.build = mkMerge [
+      { inherit bootStage1 initialRamdiskSecretAppender extraUtils; }
+
+      # generated in nixos/modules/system/boot/systemd/initrd.nix
+      (mkIf (!config.boot.initrd.systemd.enable) { inherit initialRamdisk; })
+    ];
 
     system.requiredKernelConfig = with config.lib.kernelConfig; [
       (isYes "TMPFS")