9 runXdgAutostart = config.services.xserver.desktopManager.runXdgAutostartIfNone;
13 services.xserver.desktopManager.runXdgAutostartIfNone = mkOption {
17 Whether to run XDG autostart files for sessions without a desktop manager
18 (with only a window manager), these sessions usually don't handle XDG
19 autostart files by default.
21 Some services like {option}`i18n.inputMethod` and
22 {option}`service.earlyoom` use XDG autostart files to start.
23 If this option is not set to `true` and you are using
24 a window manager without a desktop manager, you need to manually start
25 them or running `dex` somewhere.
32 services.xserver.desktopManager.session = [
35 start = optionalString runXdgAutostart ''
36 /run/current-system/systemd/bin/systemctl --user start xdg-autostart-if-no-desktop-manager.target
41 (mkIf runXdgAutostart {
42 systemd.user.targets.xdg-autostart-if-no-desktop-manager = {
43 description = "Run XDG autostart files";
44 # From `plasma-workspace`, `share/systemd/user/plasma-workspace@.target`.
46 "xdg-desktop-autostart.target"
47 "graphical-session.target"
50 "xdg-desktop-autostart.target"
51 "graphical-session.target"
53 bindsTo = [ "graphical-session.target" ];