2024-12-03 14:20:37 +00:00
|
|
|
{ lib, config, True, False, ... }:
|
2024-11-21 09:24:15 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let cfg = config.module.hardware.amd;
|
|
|
|
in {
|
2024-12-04 07:15:37 +00:00
|
|
|
options = {
|
|
|
|
module.hardware.amd = {
|
|
|
|
enable = mkEnableOption "";
|
|
|
|
amdvlk.enable = mkEnableOption "";
|
|
|
|
};
|
|
|
|
};
|
2024-11-21 09:24:15 +00:00
|
|
|
|
2024-12-04 07:15:37 +00:00
|
|
|
config = mkMerge [
|
|
|
|
(mkIf cfg.enable {
|
|
|
|
hardware = mkIf cfg.enable {
|
|
|
|
graphics = True // { enable32Bit = true; };
|
|
|
|
amdgpu = { initrd = True; };
|
|
|
|
cpu.amd = { # OPTIMIZATION FOR CPU
|
|
|
|
updateMicrocode = with config.hardware;
|
|
|
|
lib.mkDefault enableRedistributableFirmware;
|
|
|
|
ryzen-smu = True;
|
2024-11-21 09:24:15 +00:00
|
|
|
};
|
|
|
|
};
|
2024-12-04 07:15:37 +00:00
|
|
|
})
|
|
|
|
(mkIf cfg.amdvlk.enable {
|
|
|
|
hardware.amdgpu.amdvlk = True // { # IDK SHIT
|
|
|
|
support32Bit = True;
|
|
|
|
supportExperimental = False;
|
2024-11-21 09:24:15 +00:00
|
|
|
};
|
2024-12-04 07:15:37 +00:00
|
|
|
})
|
|
|
|
];
|
2024-11-21 09:24:15 +00:00
|
|
|
}
|