From ee8e99add552e0cd1b861f4b4864dca1b6430723 Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Mon, 22 Aug 2022 10:40:03 -0400 Subject: [PATCH] udiskie: make dependency on tray.target conditional Specifically, it is unnecessary to have the dependency when the udiskie tray applet is disabled. --- modules/services/udiskie.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/services/udiskie.nix b/modules/services/udiskie.nix index d445178e7..21b260a63 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" ]; };