1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-05 08:31:03 +01:00

xsession: only require xdg autostart target if explicitely enabled (#8237)

This is a fix for PR #7108 that forcibly enables xdg-desktop-autostart
units, whether or not `config.xdg.autostart` is enabled.
Partially fixes #7708, there is still a risk for conflict if
`xdg.autostart` and `services.picom` are enabled.
This commit is contained in:
Jo² 2025-11-30 14:35:54 +01:00 committed by GitHub
parent 780be8ef50
commit b1bb534c17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -188,10 +188,13 @@ in
hm-graphical-session = { hm-graphical-session = {
Unit = { Unit = {
Description = "Home Manager X session"; Description = "Home Manager X session";
Requires = [ Requires =
let
requires = lib.optional (config.xdg.autostart.enable) "xdg-desktop-autostart.target" ++ [
"graphical-session-pre.target" "graphical-session-pre.target"
"xdg-desktop-autostart.target"
]; ];
in
requires;
BindsTo = [ BindsTo = [
"graphical-session.target" "graphical-session.target"
"tray.target" "tray.target"