Add new 'hardware.cpu.amd.updateMicrocode' option.
This commit is contained in:
parent
f7530dc5ee
commit
ad65e807bd
29
modules/hardware/cpu/amd-microcode.nix
Normal file
29
modules/hardware/cpu/amd-microcode.nix
Normal 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" ];
|
||||
};
|
||||
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue