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