From dda7e9e3ee801d9fbe0cc4d0b3dde024966bc8ee Mon Sep 17 00:00:00 2001 From: Janne Heß Date: Mon, 11 Apr 2022 19:25:20 +0100 Subject: nixos/stage-1-systemd: Add mdraid support (+ test) --- nixos/modules/system/boot/stage-1.nix | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'nixos/modules/system/boot/stage-1.nix') diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 04753a6767d..3ab873604d3 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -355,7 +355,7 @@ let [ { object = bootStage1; symlink = "/init"; } - { object = pkgs.writeText "mdadm.conf" config.boot.initrd.mdadmConf; + { object = pkgs.writeText "mdadm.conf" config.boot.initrd.services.mdraid.mdadmConf; symlink = "/etc/mdadm.conf"; } { object = pkgs.runCommand "initrd-kmod-blacklist-ubuntu" { @@ -505,14 +505,6 @@ in ''; }; - boot.initrd.mdadmConf = mkOption { - default = ""; - type = types.lines; - description = '' - Contents of /etc/mdadm.conf in stage 1. - ''; - }; - boot.initrd.preLVMCommands = mkOption { default = ""; type = types.lines; @@ -736,6 +728,9 @@ in ]; boot.initrd.supportedFilesystems = map (fs: fs.fsType) fileSystems; - }; + + imports = [ + (mkRenamedOptionModule [ "boot" "initrd" "mdadmConf" ] [ "boot" "initrd" "services" "mdraid" "mdadmConf" ]) + ]; } -- cgit 1.4.1