fix(sway): use wayland WINIT backend in session env

WINIT_UNIX_BACKEND was set to x11, forcing winit apps onto XWayland in a
Wayland session, contradicting the rest of the block. Set it to wayland,
normalise the heredoc indentation, and drop the unused `options` arg.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Emma Thorpe
2026-06-04 13:34:44 +00:00
parent 1d79ba175a
commit 9a17994c30
+12 -13
View File
@@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
options,
pkgs, pkgs,
... ...
}: }:
@@ -18,18 +17,18 @@ in
enable = true; enable = true;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
extraSessionCommands = '' extraSessionCommands = ''
# QT # QT
export QT_QPA_PLATFORM="wayland;xcb" export QT_QPA_PLATFORM="wayland;xcb"
export QT_QPA_PLATFORMTHEME=qt5ct export QT_QPA_PLATFORMTHEME=qt5ct
# SDL # SDL
export SDL_VIDEODRIVER=wayland export SDL_VIDEODRIVER=wayland
# Java # Java
export _JAVA_AWT_WM_NONREPARENTING=1 export _JAVA_AWT_WM_NONREPARENTING=1
# Misc # Misc
export CLUTTER_BACKEND=wayland export CLUTTER_BACKEND=wayland
export WINIT_UNIX_BACKEND=x11 export WINIT_UNIX_BACKEND=wayland
export MOZ_ENABLE_WAYLAND=1 export MOZ_ENABLE_WAYLAND=1
''; '';
# Core Wayland utilities. The lock screen, idle daemon, status bar and # Core Wayland utilities. The lock screen, idle daemon, status bar and
# notification daemon are configured per-user in home/sway.nix. # notification daemon are configured per-user in home/sway.nix.
extraPackages = with pkgs; [ extraPackages = with pkgs; [