lol

Merge pull request #240651 from accelbread/postresumecommands

nixos/boot: add postResumeCommands option

authored by

Will Fancher and committed by
GitHub
2f73652c 9b774285

+12 -1
+2
nixos/modules/system/boot/stage-1-init.sh
··· 495 495 fi 496 496 fi 497 497 498 + @postResumeCommands@ 499 + 498 500 # If we have a path to an iso file, find the iso and link it to /dev/root 499 501 if [ -n "$isoPath" ]; then 500 502 mkdir -p /findiso
+9 -1
nixos/modules/system/boot/stage-1.nix
··· 316 316 inherit (config.system.build) earlyMountScript; 317 317 318 318 inherit (config.boot.initrd) checkJournalingFS verbose 319 - preLVMCommands preDeviceCommands postDeviceCommands postMountCommands preFailCommands kernelModules; 319 + preLVMCommands preDeviceCommands postDeviceCommands postResumeCommands postMountCommands preFailCommands kernelModules; 320 320 321 321 resumeDevices = map (sd: if sd ? device then sd.device else "/dev/disk/by-label/${sd.label}") 322 322 (filter (sd: hasPrefix "/dev/" sd.device && !sd.randomEncryption.enable ··· 524 524 Shell commands to be executed immediately after stage 1 of the 525 525 boot has loaded kernel modules and created device nodes in 526 526 {file}`/dev`. 527 + ''; 528 + }; 529 + 530 + boot.initrd.postResumeCommands = mkOption { 531 + default = ""; 532 + type = types.lines; 533 + description = lib.mdDoc '' 534 + Shell commands to be executed immediately after attempting to resume. 527 535 ''; 528 536 }; 529 537
+1
nixos/modules/system/boot/systemd/initrd.nix
··· 358 358 [ "preDeviceCommands" ] 359 359 [ "preLVMCommands" ] 360 360 [ "postDeviceCommands" ] 361 + [ "postResumeCommands" ] 361 362 [ "postMountCommands" ] 362 363 [ "extraUdevRulesCommands" ] 363 364 [ "extraUtilsCommands" ]