mirror of
				https://github.com/NixOS/nixos-hardware.git
				synced 2025-11-04 09:17:14 +08:00 
			
		
		
		
	zephyrus/ga402x: switch to amd gpu module
This commit is contained in:
		
				
					committed by
					
						
						mergify[bot]
					
				
			
			
				
	
			
			
			
						parent
						
							5fe1583567
						
					
				
				
					commit
					a5abf3379d
				
			@@ -1,17 +1,15 @@
 | 
			
		||||
{ config,
 | 
			
		||||
  lib,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
 | 
			
		||||
let
 | 
			
		||||
  inherit (lib) mkDefault mkEnableOption mkIf mkMerge;
 | 
			
		||||
  inherit (lib) mkEnableOption mkIf mkMerge;
 | 
			
		||||
  cfg = config.hardware.asus.zephyrus.ga402x;
 | 
			
		||||
 | 
			
		||||
in {
 | 
			
		||||
  imports = [
 | 
			
		||||
    ../shared.nix
 | 
			
		||||
    ../../../../common/gpu/24.05-compat.nix
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  options.hardware.asus.zephyrus.ga402x.amdgpu = {
 | 
			
		||||
@@ -21,19 +19,6 @@ in {
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config = mkMerge [
 | 
			
		||||
    {
 | 
			
		||||
      # AMD RX680
 | 
			
		||||
      services.xserver.videoDrivers = mkDefault [ "amdgpu" ];
 | 
			
		||||
 | 
			
		||||
      hardware = {
 | 
			
		||||
        amdgpu.loadInInitrd = true;
 | 
			
		||||
        graphics.extraPackages = with pkgs; [
 | 
			
		||||
          vaapiVdpau
 | 
			
		||||
          libvdpau-va-gl
 | 
			
		||||
        ];
 | 
			
		||||
      };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    (mkIf cfg.amdgpu.recovery.enable {
 | 
			
		||||
      # Hopefully fixes for where the kernel sometimes hangs when suspending or hibernating
 | 
			
		||||
      #  (Though, I'm very suspicious of the Mediatek Wifi...)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user