1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-07 21:43:52 +00:00
ultima/modules/nixos/hardware/amd/default.nix

45 lines
790 B
Nix
Raw Normal View History

{
x,
lib,
config,
...
}:
2024-11-21 09:24:15 +00:00
with lib;
2024-12-09 01:15:55 +00:00
with x;
let
cfg = config.module.hardware.amd;
in
{
2024-12-04 07:15:37 +00:00
options = {
module.hardware.amd = {
2024-12-09 01:15:55 +00:00
enable = mkBool;
amdvlk.enable = mkBool;
2024-12-04 07:15:37 +00:00
};
};
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;
2024-12-04 07:15:37 +00:00
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
2024-12-04 07:15:37 +00:00
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
}