9 cfg = config.services.ayatana-indicators;
12 options.services.ayatana-indicators = {
13 enable = lib.mkEnableOption ''
14 Ayatana Indicators, a continuation of Canonical's Application Indicators
17 packages = lib.mkOption {
18 type = lib.types.listOf lib.types.package;
20 example = lib.literalExpression "with pkgs; [ ayatana-indicator-messages ]";
22 List of packages containing Ayatana Indicator services
23 that should be brought up by a SystemD "ayatana-indicators" user target.
25 Packages specified here must have passthru.ayatana-indicators set correctly.
27 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.
33 config = lib.mkIf cfg.enable {
35 systemPackages = cfg.packages;
37 pathsToLink = [ "/share/ayatana" ];
40 # libayatana-common's ayatana-indicators.target with explicit Wants & Before to bring up requested indicator services
41 systemd.user.targets =
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)
69 description = "Target representing the lifecycle of the ${desc}. Each indicator should be bound to it in its individual service file";
70 partOf = [ "graphical-session.target" ];
71 wants = indicatorServices name;
72 before = indicatorServices name;
75 ayatana-indicators = "Ayatana Indicators";
76 lomiri-indicators = "Ayatana/Lomiri Indicators that shall be run in Lomiri";
80 meta.maintainers = with lib.maintainers; [ OPNA2608 ];