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 {
|
2015-03-25 22:44:36 +01:00
|
|
|
boot.initrd.prepend = [ "${pkgs.microcodeAmd}/amd-ucode.img" ];
|
2012-09-11 18:44:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|