2014-04-14 16:26:48 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
2012-09-11 18:44:37 +02:00
|
|
|
|
2014-04-14 16:26:48 +02:00
|
|
|
with lib;
|
2012-09-11 18:44:37 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### 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" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|