My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/infra/libkookie/nixpkgs/unstable/nixos/modules/hardware/cpu/amd-microcode.nix

29 lines
527 B

{ config, lib, pkgs, ... }:
with lib;
{
###### interface
options = {
hardware.cpu.amd.updateMicrocode = mkOption {
default = false;
type = types.bool;
description = lib.mdDoc ''
Update the CPU microcode for AMD processors.
'';
};
};
###### implementation
config = mkIf config.hardware.cpu.amd.updateMicrocode {
# Microcode updates must be the first item prepended in the initrd
boot.initrd.prepend = mkOrder 1 [ "${pkgs.microcodeAmd}/amd-ucode.img" ];
};
}