Set IMALISON_SESSION_TYPE env var for reliable X11/Wayland detection

systemd user environment persists across login sessions, so
XDG_SESSION_TYPE can be stale. Proactively set a custom variable
on each session start so ConditionEnvironment checks are reliable.

Use it for xsettingsd and random-background (X11-only services).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-09 01:05:48 -08:00
committed by Kat Huang
parent 63392614b1
commit feaca43946
3 changed files with 6 additions and 1 deletions

View File

@@ -56,6 +56,9 @@
enable = true;
preferStatusNotifierItems = true;
importedVariables = [ "GDK_PIXBUF_ICON_LOADER" ];
profileExtra = ''
systemctl --user set-environment IMALISON_SESSION_TYPE=x11
'';
};
home.keyboard = null;