nixpkgs/modules/hardware/cpu/intel-microcode.nix
Peter Simons 87c102ce2e intel microcode update module
svn path=/nixos/trunk/; revision=32477
2012-02-22 20:28:44 +00:00

35 lines
654 B
Nix

{pkgs, config, ...}:
{
###### interface
options = {
hardware.cpu.intel.updateMicrocode = pkgs.lib.mkOption {
default = false;
type = pkgs.lib.types.bool;
description = ''
Update the CPU microcode for intel processors.
'';
};
};
###### implementation
config = pkgs.lib.mkIf config.hardware.cpu.intel.updateMicrocode {
hardware.firmware = [pkgs.microcodeIntel];
jobs.microcode = {
name = "microcode";
description = "load microcode";
startOn = "started udev";
exec = "modprobe microcode";
path = [config.system.sbin.modprobe];
task = true;
};
};
}