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-11 19:25:20 +0100
committerJanne Heß <janne@hess.ooo>2022-04-14 11:39:57 +0100
commitdda7e9e3ee801d9fbe0cc4d0b3dde024966bc8ee (patch)
tree75afad3c0c72a3b3ef240da804315ccc51240edd /nixos/modules/system/boot/stage-1.nix
parent65cc198539f7c78f13c6003339ed2928ce0ac6f0 (diff)
downloadnixpkgs-dda7e9e3ee801d9fbe0cc4d0b3dde024966bc8ee.tar
nixpkgs-dda7e9e3ee801d9fbe0cc4d0b3dde024966bc8ee.tar.gz
nixpkgs-dda7e9e3ee801d9fbe0cc4d0b3dde024966bc8ee.tar.bz2
nixpkgs-dda7e9e3ee801d9fbe0cc4d0b3dde024966bc8ee.tar.lz
nixpkgs-dda7e9e3ee801d9fbe0cc4d0b3dde024966bc8ee.tar.xz
nixpkgs-dda7e9e3ee801d9fbe0cc4d0b3dde024966bc8ee.tar.zst
nixpkgs-dda7e9e3ee801d9fbe0cc4d0b3dde024966bc8ee.zip
nixos/stage-1-systemd: Add mdraid support (+ test)
Diffstat (limited to 'nixos/modules/system/boot/stage-1.nix')
-rw-r--r--nixos/modules/system/boot/stage-1.nix15
1 files changed, 5 insertions, 10 deletions
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 <filename>/etc/mdadm.conf</filename> 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" ])
+  ];
 }