1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/modules/hardware/cpu/amd-microcode.nix

30 lines
453 B
Nix
Raw Normal View History

{ 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" ];
};
}