nixos-configuration/modules/hardware/amdcpu.nix
2023-09-24 10:46:15 +02:00

16 lines
274 B
Nix

{
lib,
config,
pkgs,
...
}: let
isEnabled = config.my.hardware.isAmdCpu;
in {
options.my.hardware.isAmdCpu = lib.mkEnableOption "amd cpu";
config = lib.mkIf isEnabled {
boot.kernelModules = ["kvm-amd"];
hardware.cpu.amd.updateMicrocode = true;
};
}