1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-06 15:33:53 +00:00
ultima/modules/nixos/hardware/amd/default.nix

45 lines
790 B
Nix

{
x,
lib,
config,
...
}:
with lib;
with x;
let
cfg = config.module.hardware.amd;
in
{
options = {
module.hardware.amd = {
enable = mkBool;
amdvlk.enable = mkBool;
};
};
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;
};
};
})
(mkIf cfg.amdvlk.enable {
hardware.amdgpu.amdvlk = True // {
# IDK SHIT
support32Bit = True;
supportExperimental = False;
};
})
];
}