diff --git a/common/gpu/amd/default.nix b/common/gpu/amd/default.nix new file mode 100644 index 0000000..3f98e98 --- /dev/null +++ b/common/gpu/amd/default.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: + +{ + boot.initrd.kernelModules = [ "amdgpu" ]; + services.xserver.videoDrivers = [ "amdgpu" ]; + + hardware.opengl.extraPackages = with pkgs; [ + rocm-opencl-icd + rocm-opencl-runtime + amdvlk + ]; + + hardware.opengl = { + driSupport = lib.mkDefault true; + driSupport32Bit = lib.mkDefault true; + }; +} diff --git a/common/gpu/amd/sea-islands/default.nix b/common/gpu/amd/sea-islands/default.nix new file mode 100644 index 0000000..697e825 --- /dev/null +++ b/common/gpu/amd/sea-islands/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ ../. ]; + # Explicitly set amdgpu support in place of radeon + boot.kernelParams = [ "radeon.cik_support=0" "amdgpu.cik_support=1" ]; +} diff --git a/common/gpu/amd/southern-islands/default.nix b/common/gpu/amd/southern-islands/default.nix new file mode 100644 index 0000000..4939117 --- /dev/null +++ b/common/gpu/amd/southern-islands/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ ../. ]; + # Explicitly set amdgpu support in place of radeon + boot.kernelParams = [ "radeon.si_support=0" "amdgpu.si_support=1" ]; +} diff --git a/flake.nix b/flake.nix index 410527d..0ea3a68 100644 --- a/flake.nix +++ b/flake.nix @@ -85,6 +85,9 @@ common-cpu-intel-sandy-bridge = import ./common/cpu/intel/sandy-bridge; common-gpu-nvidia = import ./common/gpu/nvidia.nix; common-gpu-nvidia-disable = import ./common/gpu/nvidia-disable.nix; + common-gpu-amd = import ./common/gpu/amd; + common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands; + common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands; common-pc-hdd = import ./common/pc/hdd; common-pc-laptop-hdd = import ./common/pc/laptop/hdd; common-pc-laptop-ssd = import ./common/pc/ssd;