diff options
author | Franck Cuny <franck@fcuny.net> | 2022-04-06 06:37:34 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-04-06 06:37:34 -0700 |
commit | 19cf9d640d1e7c3cdab01ad362945a051721d9b1 (patch) | |
tree | ef614d306967aefb1c170a9a6c4074c02611cbab /modules/hardware/amd | |
parent | refactor intel related configuration (diff) | |
download | world-19cf9d640d1e7c3cdab01ad362945a051721d9b1.tar.gz |
refactor configuration for AMD
Diffstat (limited to 'modules/hardware/amd')
-rw-r--r-- | modules/hardware/amd/default.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/hardware/amd/default.nix b/modules/hardware/amd/default.nix new file mode 100644 index 0000000..05362db --- /dev/null +++ b/modules/hardware/amd/default.nix @@ -0,0 +1,13 @@ +{ config, lib, ... }: +let cfg = config.my.hardware.amd; +in { + options.my.hardware.amd = with lib; { + enable = mkEnableOption "AMD related configuration"; + }; + + config = lib.mkIf cfg.enable { + # Enable microcode update + hardware.cpu.amd.updateMicrocode = true; + boot.kernelModules = [ "kvm-amd" ]; + }; +} |