diff --git a/modules/services/udiskie.nix b/modules/services/udiskie.nix index d445178e..21b260a6 100644 --- a/modules/services/udiskie.nix +++ b/modules/services/udiskie.nix @@ -109,8 +109,9 @@ in { systemd.user.services.udiskie = { Unit = { Description = "udiskie mount daemon"; - Requires = [ "tray.target" ]; - After = [ "graphical-session-pre.target" "tray.target" ]; + Requires = lib.optional (cfg.tray != "never") "tray.target"; + After = [ "graphical-session-pre.target" ] + ++ lib.optional (cfg.tray != "never") "tray.target"; PartOf = [ "graphical-session.target" ]; };