mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 03:43:53 +03:00
nixos/stage-1: add postEarlyDeviceCommands hook
This commit is contained in:
parent
919762e4bd
commit
8f967a3056
@ -149,6 +149,10 @@ udevadm trigger --action=add
|
||||
udevadm settle
|
||||
|
||||
|
||||
# Additional devices initialization.
|
||||
@postEarlyDeviceCommands@
|
||||
|
||||
|
||||
# Load boot-time keymap before any LVM/LUKS initialization
|
||||
@extraUtils@/bin/busybox loadkmap < "@busyboxKeymap@"
|
||||
|
||||
|
@ -203,7 +203,7 @@ let
|
||||
inherit (config.boot) resumeDevice devSize runSize;
|
||||
|
||||
inherit (config.boot.initrd) checkJournalingFS
|
||||
preLVMCommands postDeviceCommands postMountCommands kernelModules;
|
||||
postEarlyDeviceCommands preLVMCommands postDeviceCommands postMountCommands kernelModules;
|
||||
|
||||
resumeDevices = map (sd: if sd ? device then sd.device else "/dev/disk/by-label/${sd.label}")
|
||||
(filter (sd: sd ? label || hasPrefix "/dev/" sd.device) config.swapDevices);
|
||||
@ -313,6 +313,14 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
boot.initrd.postEarlyDeviceCommands = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Shell commands to be executed early after creation of device nodes.
|
||||
'';
|
||||
};
|
||||
|
||||
boot.initrd.postMountCommands = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
|
Loading…
Reference in New Issue
Block a user