mirror of
				https://github.com/librephoenix/nixos-config
				synced 2025-11-04 18:04:00 +05:30 
			
		
		
		
	Fixes gpu/mesa/opengl version mismatches on hyprland
This commit is contained in:
		
							parent
							
								
									899db63096
								
							
						
					
					
						commit
						3141f4bfaa
					
				
					 3 changed files with 23 additions and 11 deletions
				
			
		| 
						 | 
					@ -8,9 +8,9 @@
 | 
				
			||||||
    [ (modulesPath + "/installer/scan/not-detected.nix")
 | 
					    [ (modulesPath + "/installer/scan/not-detected.nix")
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
 | 
					  boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "radeon" ];
 | 
				
			||||||
  boot.initrd.kernelModules = [ ];
 | 
					  boot.initrd.kernelModules = [ "radeon" ];
 | 
				
			||||||
  boot.kernelModules = [ "kvm-amd" ];
 | 
					  boot.kernelModules = [ "kvm-amd" "radeon" ];
 | 
				
			||||||
  boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
 | 
					  boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
 | 
				
			||||||
  hardware.opengl.extraPackages = [ pkgs.amdvlk ];
 | 
					  hardware.opengl.extraPackages = [ pkgs.amdvlk ];
 | 
				
			||||||
  hardware.opengl.extraPackages32 = [ pkgs.driversi686Linux.amdvlk ];
 | 
					  hardware.opengl.extraPackages32 = [ pkgs.driversi686Linux.amdvlk ];
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
{ inputs, pkgs, ... }:
 | 
					{ inputs, pkgs, lib, ... }: let
 | 
				
			||||||
 | 
					  pkgs-hyprland = inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system};
 | 
				
			||||||
 | 
					in
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  # Import wayland config
 | 
					  # Import wayland config
 | 
				
			||||||
  imports = [ ./wayland.nix
 | 
					  imports = [ ./wayland.nix
 | 
				
			||||||
| 
						 | 
					@ -30,4 +31,14 @@
 | 
				
			||||||
      portalPackage = pkgs.xdg-desktop-portal-hyprland;
 | 
					      portalPackage = pkgs.xdg-desktop-portal-hyprland;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # fixes opengl/mesa version mismatch
 | 
				
			||||||
 | 
					  hardware.opengl = {
 | 
				
			||||||
 | 
					    package = pkgs-hyprland.mesa.drivers;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # if you also want 32-bit support (e.g for Steam)
 | 
				
			||||||
 | 
					    driSupport32Bit = true;
 | 
				
			||||||
 | 
					    package32 = pkgs-hyprland.pkgsi686Linux.mesa.drivers;
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					  services.xserver.displayManager.sddm.package = lib.mkForce pkgs-hyprland.sddm;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
{ inputs, config, lib, pkgs, userSettings, systemSettings, ... }:
 | 
					{ inputs, config, lib, pkgs, userSettings, systemSettings, ... }: let
 | 
				
			||||||
 | 
					  pkgs-hyprland = inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system};
 | 
				
			||||||
 | 
					in
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
    ../../app/terminal/alacritty.nix
 | 
					    ../../app/terminal/alacritty.nix
 | 
				
			||||||
| 
						 | 
					@ -320,7 +321,7 @@
 | 
				
			||||||
    systemd.enable = true;
 | 
					    systemd.enable = true;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  home.packages = with pkgs; [
 | 
					  home.packages = (with pkgs; [
 | 
				
			||||||
    alacritty
 | 
					    alacritty
 | 
				
			||||||
    kitty
 | 
					    kitty
 | 
				
			||||||
    feh
 | 
					    feh
 | 
				
			||||||
| 
						 | 
					@ -368,7 +369,6 @@
 | 
				
			||||||
    hyprland-protocols
 | 
					    hyprland-protocols
 | 
				
			||||||
    hyprpicker
 | 
					    hyprpicker
 | 
				
			||||||
    hypridle
 | 
					    hypridle
 | 
				
			||||||
    hyprlock
 | 
					 | 
				
			||||||
    swaybg
 | 
					    swaybg
 | 
				
			||||||
    fnott
 | 
					    fnott
 | 
				
			||||||
    fuzzel
 | 
					    fuzzel
 | 
				
			||||||
| 
						 | 
					@ -449,8 +449,9 @@
 | 
				
			||||||
      terminal = false;
 | 
					      terminal = false;
 | 
				
			||||||
      icon = "emacs";
 | 
					      icon = "emacs";
 | 
				
			||||||
      type = "Application";
 | 
					      type = "Application";
 | 
				
			||||||
    })
 | 
					    })])
 | 
				
			||||||
  ];
 | 
					  ++
 | 
				
			||||||
 | 
					  (with pkgs-hyprland; [ hyprlock ]);
 | 
				
			||||||
  home.file.".config/nwg-dock-hyprland/style.css".text = ''
 | 
					  home.file.".config/nwg-dock-hyprland/style.css".text = ''
 | 
				
			||||||
    window {
 | 
					    window {
 | 
				
			||||||
      background: rgba(''+config.lib.stylix.colors.base00-rgb-r+'',''+config.lib.stylix.colors.base00-rgb-g+'',''+config.lib.stylix.colors.base00-rgb-b+'',0.0);
 | 
					      background: rgba(''+config.lib.stylix.colors.base00-rgb-r+'',''+config.lib.stylix.colors.base00-rgb-g+'',''+config.lib.stylix.colors.base00-rgb-b+'',0.0);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue