From a95ddcdb32f44dc1bafdd7cf5881cf7822c345e2 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Wed, 5 Jul 2023 10:09:01 +0200 Subject: [PATCH] desktop: Don't make SSH_AUTH_SOCK depend on cfg.wayland --- modules/desktop/default.nix | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 8187a41..cc28e63 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -75,18 +75,23 @@ in }; environment = { - sessionVariables = mkIf cfg.wayland { - _JAVA_AWT_WM_NONREPARENTING = "1"; - MOZ_ENABLE_WAYLAND = "1"; - MOZ_DBUS_REMOTE = "1"; - QT_QPA_PLATFORM = "wayland"; - QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; - QT_QPA_PLATFORMTHEME = "qt5ct"; - SDL_VIDEODRIVER = "wayland"; - SSH_AUTH_SOCK = ''''${XDG_RUNTIME_DIR}/keyring/ssh''; - AMD_VULKAN_ICD = "RADV"; - NIXOS_OZONE_WL = "1"; - }; + sessionVariables = mkMerge [ + { + SSH_AUTH_SOCK = ''''${XDG_RUNTIME_DIR}/keyring/ssh''; + } + (mkIf cfg.wayland + { + _JAVA_AWT_WM_NONREPARENTING = "1"; + MOZ_ENABLE_WAYLAND = "1"; + MOZ_DBUS_REMOTE = "1"; + QT_QPA_PLATFORM = "wayland"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + QT_QPA_PLATFORMTHEME = "qt5ct"; + SDL_VIDEODRIVER = "wayland"; + AMD_VULKAN_ICD = "RADV"; + NIXOS_OZONE_WL = "1"; + }) + ]; etc = { "X11/xkb".source = "${pkgs.xkeyboard_config}/etc/X11/xkb";