Add new 'hardware.cpu.amd.updateMicrocode' option.

This commit is contained in:
Peter Simons 2012-09-11 18:44:37 +02:00
parent f7530dc5ee
commit ad65e807bd
2 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,29 @@
{ config, pkgs, ... }:
with pkgs.lib;
{
###### interface
options = {
hardware.cpu.amd.updateMicrocode = mkOption {
default = false;
type = types.bool;
description = ''
Update the CPU microcode for Amd processors.
'';
};
};
###### implementation
config = mkIf config.hardware.cpu.amd.updateMicrocode {
hardware.firmware = [ pkgs.amdUcode ];
boot.kernelModules = [ "microcode" ];
};
}

View file

@ -16,6 +16,7 @@
./config/users-groups.nix
./hardware/all-firmware.nix
./hardware/cpu/intel-microcode.nix
./hardware/cpu/amd-microcode.nix
./hardware/network/b43.nix
./hardware/network/intel-2100bg.nix
./hardware/network/intel-2200bg.nix