2021-12-21 22:18:14 +00:00
|
|
|
{ config, lib, ... }: {
|
|
|
|
options = {
|
|
|
|
within.microcode = {
|
|
|
|
enable = lib.mkEnableOption "Enables CPU Microcode updates";
|
|
|
|
vendor = lib.mkOption { type = lib.types.enum [ "intel" "amd" ]; };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf config.within.microcode.enable {
|
2021-12-21 22:20:25 +00:00
|
|
|
hardware.cpu.intel.updateMicrocode = (config.within.microcode.vendor == "intel");
|
|
|
|
hardware.cpu.amd.updateMicrocode = (config.within.microcode.vendor == "amd");
|
2021-12-21 22:18:14 +00:00
|
|
|
};
|
|
|
|
}
|