33 lines
		
	
	
	
		
			832 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
	
		
			832 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  lib,
 | 
						|
  config,
 | 
						|
  osConfig,
 | 
						|
  ...
 | 
						|
}: let
 | 
						|
  inherit (lib) mkIf;
 | 
						|
  cfg = config.ooknet.wayland;
 | 
						|
  gpu = osConfig.ooknet.host.hardware.gpu;
 | 
						|
in {
 | 
						|
  config = mkIf cfg.enable {
 | 
						|
    home.sessionVariables =
 | 
						|
      {
 | 
						|
        CLUTTER_BACKEND = "wayland";
 | 
						|
        NIXOS_OZONE_WL = "1";
 | 
						|
        GDK_BACKEND = "wayland";
 | 
						|
        QT_QPA_PLATFORM = "wayland";
 | 
						|
        QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
 | 
						|
        DISABLE_QT5_COMPAT = "0";
 | 
						|
        QT_AUTO_SCREEN_SCALE_FACTOR = "1";
 | 
						|
        MOZ_ENABLE_WAYLAND = "1";
 | 
						|
        MOZ_DBUS_REMOTE = "1";
 | 
						|
        XDG_SESSION_TYPE = "wayland";
 | 
						|
        SDL_VIDEODRIVER = "wayland";
 | 
						|
      }
 | 
						|
      // mkIf (gpu == "nvidia") {
 | 
						|
        LIBVA_DRIVER_NAME = "nvidia";
 | 
						|
        GBM_BACKEND = "nvidia-drm";
 | 
						|
        __GLX_VENDOR_LIBRARY_NAME = "nvidia";
 | 
						|
        WLR_NO_HARDWARE_CURSORS = "1";
 | 
						|
      };
 | 
						|
  };
 | 
						|
}
 |