sxmo: fix missing XDG_SESSION_TYPE env var

This commit is contained in:
Colin 2023-12-05 08:06:14 +00:00
parent 10c21714ef
commit f350d7949c
2 changed files with 8 additions and 1 deletions

View File

@ -277,6 +277,7 @@ in
# - org.freedesktop.impl.portal.ScreenCast
# - org.freedesktop.impl.portal.Screenshot
enable = true;
package = cfg.package;
extraPackages = []; # nixos adds swaylock, swayidle, foot, dmenu by default
# extraOptions = [ "--debug" ];
# "wrapGAppsHook wrapper to execute sway with required environment variables for GTK applications."
@ -287,7 +288,11 @@ in
# this sets XDG_CURRENT_DESKTOP=sway
# and makes sure that sway is launched dbus-run-session.
wrapperFeatures.base = true;
package = cfg.package;
extraSessionCommands = ''
# XXX(2023/12/04): fixes a bug where sxmo somehow doesn't set XDG_SESSION_TYPE, preventing apps like Komikku from launching.
# wlroots should set this: idk where/why it's failing
export XDG_SESSION_TYPE=wayland
'';
};
programs.xwayland.enable = cfg.config.xwayland;
# provide portals for:

View File

@ -190,5 +190,7 @@ output "Unknown 0x0637 0x00000000" {
# - XDG_CURRENT_DESKTOP
# for more, see: <repo:nixos/nixpkgs:nixos/modules/programs/wayland/sway.nix>
include /etc/sway/config.d/*
# XXX(2023/12/04): this shouldn't be necessary, but without this (and the other code which actually sets the variable) Komikku on moby fails to launch because XDG_SESSION_TYPE is unset
exec dbus-update-activation-environment --systemd XDG_SESSION_TYPE
@extra_lines@