nixos: Add boot.initrd.extraUdevRulesCommands
This commit is contained in:
parent
83cecbdcbc
commit
31df4f70af
|
@ -127,8 +127,8 @@ let
|
|||
cp -v ${udev}/lib/udev/rules.d/60-persistent-storage.rules $out/
|
||||
cp -v ${udev}/lib/udev/rules.d/80-drivers.rules $out/
|
||||
cp -v ${pkgs.lvm2}/lib/udev/rules.d/*.rules $out/
|
||||
cp -v ${pkgs.mdadm}/lib/udev/rules.d/*.rules $out/
|
||||
cp -v ${pkgs.bcache-tools}/lib/udev/rules.d/*.rules $out/
|
||||
${config.boot.initrd.extraUdevRulesCommands}
|
||||
|
||||
for i in $out/*.rules; do
|
||||
substituteInPlace $i \
|
||||
|
@ -302,6 +302,17 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
boot.initrd.extraUdevRulesCommands = mkOption {
|
||||
internal = true;
|
||||
default = "";
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Shell commands to be executed in the builder of the
|
||||
udev-rules derivation. This can be used to add
|
||||
additional udev rules in the initial ramdisk.
|
||||
'';
|
||||
};
|
||||
|
||||
boot.initrd.compressor = mkOption {
|
||||
internal = true;
|
||||
default = "gzip -9";
|
||||
|
|
|
@ -8,4 +8,8 @@
|
|||
|
||||
boot.initrd.availableKernelModules = [ "md_mod" "raid0" "raid1" "raid456" ];
|
||||
|
||||
boot.initrd.extraUdevRulesCommands = ''
|
||||
cp -v ${pkgs.mdadm}/lib/udev/rules.d/*.rules $out/
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue