summary refs log tree commit diff
path: root/nixos/modules/hardware/cpu/intel-microcode.nix
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2017-02-27 17:12:33 +0100
committerFranz Pletz <fpletz@fnordicwalking.de>2017-02-27 17:12:33 +0100
commitbccac381b27592bdc22d151c744814716eb4f7ec (patch)
treeed057748269a05003870801b67015990ef8a9e28 /nixos/modules/hardware/cpu/intel-microcode.nix
parent2edb8ffa14e04e77ee5041cccd82e0b083353572 (diff)
downloadnixpkgs-bccac381b27592bdc22d151c744814716eb4f7ec.tar
nixpkgs-bccac381b27592bdc22d151c744814716eb4f7ec.tar.gz
nixpkgs-bccac381b27592bdc22d151c744814716eb4f7ec.tar.bz2
nixpkgs-bccac381b27592bdc22d151c744814716eb4f7ec.tar.lz
nixpkgs-bccac381b27592bdc22d151c744814716eb4f7ec.tar.xz
nixpkgs-bccac381b27592bdc22d151c744814716eb4f7ec.tar.zst
nixpkgs-bccac381b27592bdc22d151c744814716eb4f7ec.zip
microcode updates: prepend first in initrd
Prevents crashing the kernel on boot if other blobs are prepended
before the microkernel update image.

Fixes #22674.
Diffstat (limited to 'nixos/modules/hardware/cpu/intel-microcode.nix')
-rw-r--r--nixos/modules/hardware/cpu/intel-microcode.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/hardware/cpu/intel-microcode.nix b/nixos/modules/hardware/cpu/intel-microcode.nix
index 89ae4f45806..acce565fd80 100644
--- a/nixos/modules/hardware/cpu/intel-microcode.nix
+++ b/nixos/modules/hardware/cpu/intel-microcode.nix
@@ -22,7 +22,8 @@ with lib;
   ###### implementation
 
   config = mkIf config.hardware.cpu.intel.updateMicrocode {
-    boot.initrd.prepend = [ "${pkgs.microcodeIntel}/intel-ucode.img" ];
+    # Microcode updates must be the first item prepended in the initrd
+    boot.initrd.prepend = mkOrder 1 [ "${pkgs.microcodeIntel}/intel-ucode.img" ];
   };
 
 }