diff --git a/modules/services/redshift-gammastep/lib/options.nix b/modules/services/redshift-gammastep/lib/options.nix index f2c0922b..a5aeac55 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" ]; };