feat(wayland): add wayland.enable option
sets wayland specific environment variables and enables xdg.portal
This commit is contained in:
		
							parent
							
								
									82f539c989
								
							
						
					
					
						commit
						9b0f424601
					
				
					 1 changed files with 30 additions and 3 deletions
				
			
		|  | @ -1,4 +1,8 @@ | |||
| { lib, ... }: | ||||
| { lib, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.desktop.wayland; | ||||
| in | ||||
| { | ||||
|   imports = [ | ||||
|     ./bar | ||||
|  | @ -10,8 +14,31 @@ | |||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.desktop.wayland = { | ||||
|     base = { | ||||
|       enable = lib.mkEnableOption "Enable wayland specific utilities"; | ||||
|     enable = lib.mkEnableOption "Enable wayland specific confurations"; | ||||
|     nvidia = lib.mkOption { | ||||
|       type = lib.types.bool; | ||||
|       default = false; | ||||
|       description = "Enable nvidia wayland configuration"; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     xdg.portal.enable = true; | ||||
|     home.sessionVariables = { | ||||
|       CLUTTER_BACKEND = "wayland"; | ||||
|       NIXOS_OZONE_WL = "1"; | ||||
|       GDK_BACKEND = "wayland"; | ||||
|       QT_QPA_PLATFORM = "wayland"; | ||||
|       QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; | ||||
|       MOZ_ENABLE_WAYLAND = "1"; | ||||
|       MOZ_DBUS_REMOTE = "1"; | ||||
|       XDG_SESSION_TYPE = "wayland"; | ||||
|       SDL_VIDEODRIVER = "wayland"; | ||||
|     } // lib.mkIf cfg.nvidia { | ||||
|       LIBVA_DRIVER_NAME = "nvidia"; | ||||
|       GBM_BACKEND = "nvidia-drm"; | ||||
|       __GLX_VENDOR_LIBRARY_NAME = "nvidia"; | ||||
|       WLR_NO_HARDWARE_CURSORS = "1"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue