mirror of
				https://github.com/NixOS/nixos-hardware.git
				synced 2025-11-04 01:07:14 +08:00 
			
		
		
		
	AMD: add configurations for graphics cards
This commit is contained in:
		
							
								
								
									
										17
									
								
								common/gpu/amd/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								common/gpu/amd/default.nix
									
									
									
									
									
										Normal file
									
								
							@@ -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;
 | 
			
		||||
  };
 | 
			
		||||
} 
 | 
			
		||||
							
								
								
									
										4
									
								
								common/gpu/amd/sea-islands/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								common/gpu/amd/sea-islands/default.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
{
 | 
			
		||||
  imports = [ ../. ];
 | 
			
		||||
  boot.kernelParams = [ "radeon.cik_support=0" "amdgpu.cik_support=1" ];
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										4
									
								
								common/gpu/amd/southern-islands/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								common/gpu/amd/southern-islands/default.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
{
 | 
			
		||||
  imports = [ ../. ];
 | 
			
		||||
  boot.kernelParams = [ "radeon.si_support=0" "amdgpu.si_support=1" ];
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user