nixpkgs/modules/hardware/cpu/intel-microcode.nix
Mathijs Kwik c5a8d53d95 fixed intel microcode loading during boot
svn path=/nixos/trunk/; revision=33226
2012-03-18 08:10:32 +00:00

40 lines
790 B
Nix

{ config, pkgs, ... }:
with pkgs.lib;
{
###### interface
options = {
hardware.cpu.intel.updateMicrocode = mkOption {
default = false;
type = types.bool;
description = ''
Update the CPU microcode for Intel processors.
'';
};
};
###### implementation
config = mkIf config.hardware.cpu.intel.updateMicrocode {
hardware.firmware = [ pkgs.microcodeIntel ];
# This cannot be done using boot.kernelModules
# discussion at http://lists.science.uu.nl/pipermail/nix-dev/2012-February/007959.html
jobs.microcode = {
name = "microcode";
description = "load microcode";
startOn = "started udev";
exec = "modprobe microcode";
path = [config.system.sbin.modprobe];
task = true;
};
};
}