diff --git a/modules/system/boot/stage-1.nix b/modules/system/boot/stage-1.nix index 1932599193e..9ad86312290 100644 --- a/modules/system/boot/stage-1.nix +++ b/modules/system/boot/stage-1.nix @@ -35,6 +35,14 @@ let ''; }; + boot.initrd.mdadmConf = mkOption { + default = ""; + type = with types; string; + description = '' + Contents of /etc/mdadm.conf at initrd. + ''; + }; + boot.initrd.preLVMCommands = mkOption { default = ""; type = with types; string; @@ -313,6 +321,9 @@ let [ { object = bootStage1; symlink = "/init"; } + { object = pkgs.writeText "mdadm.conf" config.boot.initrd.mdadmConf; + symlink = "/etc/mdadm.conf"; + } ] ++ optionals enableSplashScreen [ { object = extraUtils; suffix = "/bin/splash_helper";