2014-04-14 15:26:48 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2012-09-11 17:44:37 +01:00
|
|
|
|
2014-04-14 15:26:48 +01:00
|
|
|
with lib;
|
2012-09-11 17:44:37 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
hardware.cpu.amd.updateMicrocode = mkOption {
|
|
|
|
default = false;
|
|
|
|
type = types.bool;
|
|
|
|
description = ''
|
2013-08-10 22:07:13 +01:00
|
|
|
Update the CPU microcode for AMD processors.
|
2012-09-11 17:44:37 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
|
|
|
config = mkIf config.hardware.cpu.amd.updateMicrocode {
|
2017-02-27 16:12:33 +00:00
|
|
|
# Microcode updates must be the first item prepended in the initrd
|
|
|
|
boot.initrd.prepend = mkOrder 1 [ "${pkgs.microcodeAmd}/amd-ucode.img" ];
|
2012-09-11 17:44:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|