From c1addfdad3825f75a66f8d73ec7d2f68c78ba6f8 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Fri, 5 Aug 2022 13:55:25 -0700 Subject: [PATCH] gammastep: wait on geoclue-agent when configured --- modules/services/redshift-gammastep/lib/options.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/services/redshift-gammastep/lib/options.nix b/modules/services/redshift-gammastep/lib/options.nix index f2c0922b0..a5aeac55b 100644 --- a/modules/services/redshift-gammastep/lib/options.nix +++ b/modules/services/redshift-gammastep/lib/options.nix @@ -182,10 +182,14 @@ in { settingsFormat.generate xdgConfigFilePath cfg.settings; systemd.user.services.${moduleName} = { - Unit = { + Unit = let + geoclueAgentService = + lib.optional (cfg.provider == "geoclue2") "geoclue-agent.service"; + in { Description = "${programName} colour temperature adjuster"; Documentation = serviceDocumentation; - After = [ "graphical-session-pre.target" ]; + After = [ "graphical-session-pre.target" ] ++ geoclueAgentService; + Wants = geoclueAgentService; PartOf = [ "graphical-session.target" ]; };