2012-03-17 17:26:17 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
2012-02-22 20:28:44 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
2012-03-17 17:26:17 +00:00
|
|
|
hardware.cpu.intel.updateMicrocode = mkOption {
|
2012-02-22 20:28:44 +00:00
|
|
|
default = false;
|
2012-03-17 17:26:17 +00:00
|
|
|
type = types.bool;
|
2012-02-22 20:28:44 +00:00
|
|
|
description = ''
|
2012-03-17 17:26:17 +00:00
|
|
|
Update the CPU microcode for Intel processors.
|
2012-02-22 20:28:44 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
2012-03-17 17:26:17 +00:00
|
|
|
config = mkIf config.hardware.cpu.intel.updateMicrocode {
|
2013-09-04 12:22:52 +00:00
|
|
|
hardware.firmware = [ "${pkgs.microcodeIntel}/lib/firmware" ];
|
2012-03-18 14:03:42 +00:00
|
|
|
boot.kernelModules = [ "microcode" ];
|
2012-02-22 20:28:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|