2012-09-11 18:44:37 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
hardware.cpu.amd.updateMicrocode = mkOption {
|
|
|
|
default = false;
|
|
|
|
type = types.bool;
|
|
|
|
description = ''
|
2013-08-10 23:07:13 +02:00
|
|
|
Update the CPU microcode for AMD processors.
|
2012-09-11 18:44:37 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
|
|
|
config = mkIf config.hardware.cpu.amd.updateMicrocode {
|
2013-09-04 14:22:52 +02:00
|
|
|
hardware.firmware = [ "${pkgs.amdUcode}/lib/firmware" ];
|
2012-09-11 18:44:37 +02:00
|
|
|
boot.kernelModules = [ "microcode" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|