mirror of
				https://github.com/NixOS/nixos-hardware.git
				synced 2025-11-04 09:17:14 +08:00 
			
		
		
		
	Extract AMD-GPU from Nvidia, to make it easier to choose either
This commit is contained in:
		
							
								
								
									
										23
									
								
								lenovo/yoga/7/14ARH7/amdgpu/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								lenovo/yoga/7/14ARH7/amdgpu/default.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
# Including this file will enable the AMD-GPU driver
 | 
			
		||||
 | 
			
		||||
{ lib, pkgs, ... }:
 | 
			
		||||
 | 
			
		||||
let
 | 
			
		||||
  inherit (lib) mkDefault;
 | 
			
		||||
 | 
			
		||||
in {
 | 
			
		||||
  imports = [
 | 
			
		||||
    ../shared.nix
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  # AMD RX680
 | 
			
		||||
  services.xserver.videoDrivers = mkDefault [ "amdgpu" ];
 | 
			
		||||
 | 
			
		||||
  hardware = {
 | 
			
		||||
    amdgpu.loadInInitrd = true;
 | 
			
		||||
    opengl.extraPackages = with pkgs; [
 | 
			
		||||
      vaapiVdpau
 | 
			
		||||
      libvdpau-va-gl
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user