nix/module/AmdGpu.nix

34 lines
698 B
Nix
Raw Normal View History

{
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.module.amd.gpu;
in
{
options = {
module.amd.gpu.enable = mkEnableOption "Enable AMD Gpu support.";
};
2024-03-20 22:33:37 +03:00
config = mkIf cfg.enable {
boot.initrd.kernelModules = [ "amdgpu" ];
services.xserver.videoDrivers = [ "amdgpu" ];
hardware.graphics = {
enable = true;
enable32Bit = true;
};
environment.variables.AMD_VULKAN_ICD = "RADV";
2024-06-25 04:04:39 +03:00
# AMDVLK was broken for me (huge stuttering). So keep it disabled, at least for now.
# hardware.opengl.extraPackages = with pkgs; [
# amdvlk
# ];
# hardware.opengl.extraPackages32 = with pkgs; [
# driversi686Linux.amdvlk
# ];
};
}