mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-01-08 21:33:52 +00:00
34 lines
764 B
Nix
34 lines
764 B
Nix
{ lib, config, True, False, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.module.hardware.amd;
|
|
in {
|
|
options = {
|
|
module.hardware.amd = {
|
|
enable = mkEnableOption "";
|
|
amdvlk.enable = mkEnableOption "";
|
|
};
|
|
};
|
|
|
|
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;
|
|
};
|
|
})
|
|
];
|
|
}
|