From 9f3c9fe588d7241f88acb29d8ce7f1e878698a6f Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 17 Mar 2024 12:02:20 +0100 Subject: [PATCH] fix wayland --- flake.nix | 1 + home-manager/zsh.nix | 3 ++- modules/graphical/plasma.nix | 1 + modules/graphical/wayland.nix | 21 +++++++++++++++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 modules/graphical/wayland.nix diff --git a/flake.nix b/flake.nix index 2b96754..a661931 100644 --- a/flake.nix +++ b/flake.nix @@ -97,6 +97,7 @@ ### User specific ### ./users/kopatz ### System modules ### + ./modules/graphical/wayland.nix ./modules/graphical/plasma.nix #./modules/graphical/hyprland.nix ./modules/graphical/emulators.nix diff --git a/home-manager/zsh.nix b/home-manager/zsh.nix index 1ad342a..7c861d0 100644 --- a/home-manager/zsh.nix +++ b/home-manager/zsh.nix @@ -9,7 +9,8 @@ update = "sudo nixos-rebuild switch"; updateOffline = "sudo nixos-rebuild switch --option substitute false"; checkTime = "(cd ~/Nextcloud/work_drive/TS && nix run)"; - ssh="TERM=xterm-256color ssh"; + checkWaylandWindowsKDE = "qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole"; + ssh = "TERM=xterm-256color ssh"; }; oh-my-zsh = { enable = true; diff --git a/modules/graphical/plasma.nix b/modules/graphical/plasma.nix index 6dfd7df..c205fb1 100644 --- a/modules/graphical/plasma.nix +++ b/modules/graphical/plasma.nix @@ -6,6 +6,7 @@ xkb.variant = ""; enable = true; displayManager.sddm.enable = true; + displayManager.sddm.wayland.enable = true; }; services.desktopManager.plasma6.enable = true; } diff --git a/modules/graphical/wayland.nix b/modules/graphical/wayland.nix new file mode 100644 index 0000000..73760a7 --- /dev/null +++ b/modules/graphical/wayland.nix @@ -0,0 +1,21 @@ +{ + environment.sessionVariables = { + # For shared clipboard with Xwayland apps + MOZ_DBUS_REMOTE = "1"; + KITTY_ENABLE_WAYLAND = "1"; + _JAVA_AWT_WM_NONREPARENTING = "1"; + MOZ_ENABLE_WAYLAND = "1"; + WLR_NO_HARDWARE_CURSORS = "1"; + NIXOS_OZONE_WL = "1"; + + LIBVA_DRIVER_NAME = "nvidia"; + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; + GBM_BACKEND = "nvidia-drm"; + + XDG_SESSION_TYPE = "wayland"; + # Can break some native games + SDL_VIDEODRIVER = "wayland"; + QT_QPA_PLATFORM = "wayland;xcb"; + ELECTRON_OZONE_PLATFORM_HINT = "wayland"; + }; +}