···
example = lib.literalExpression "with pkgs; [ ayatana-indicator-messages ]";
List of packages containing Ayatana Indicator services
23
-
that should be brought up by the SystemD "ayatana-indicators" user target.
23
+
that should be brought up by a SystemD "ayatana-indicators" user target.
Packages specified here must have passthru.ayatana-indicators set correctly.
If, how, and where these indicators are displayed will depend on your DE.
28
+
Which target they will be brought up by depends on the packages' passthru.ayatana-indicators.
···
# libayatana-common's ayatana-indicators.target with explicit Wants & Before to bring up requested indicator services
42
-
indicatorServices = lib.lists.flatten (
43
-
map (pkg: (map (ind: "${ind}.service") pkg.passthru.ayatana-indicators)) cfg.packages
43
+
namesToServices = map (indicator: "${indicator}.service");
49
+
if lib.isList pkg.passthru.ayatana-indicators then
50
+
# Old format, add to every target
51
+
(lib.warn "${pkg.name} is using the old passthru.ayatana-indicators format, please update it!" (
52
+
namesToServices pkg.passthru.ayatana-indicators
55
+
# New format, filter by target being mentioned
60
+
targetPrefix: "${targetPrefix}-indicators" == target
61
+
) pkg.passthru.ayatana-indicators.${service}
62
+
) (builtins.attrNames pkg.passthru.ayatana-indicators)
description = "Target representing the lifecycle of the ${desc}. Each indicator should be bound to it in its individual service file";
partOf = [ "graphical-session.target" ];
50
-
wants = indicatorServices;
51
-
before = indicatorServices;
71
+
wants = indicatorServices name;
72
+
before = indicatorServices name;
ayatana-indicators = "Ayatana Indicators";