nixos/ayatana-indicators: Add systemd target for Lomiri

Lomiri now uses a separate systemd user target for all indicators that should start under Lomiri, because some Ayatana-like indicators do not make sense on non-Lomiri desktops.

Probably temporary, as we should instead encode this data from every indicator's service file into some passthru attribute.
This commit is contained in:
OPNA2608 2024-08-03 14:10:03 +02:00
parent b569272194
commit 25625d78e4

View File

@ -38,20 +38,23 @@ in
};
# libayatana-common's ayatana-indicators.target with explicit Wants & Before to bring up requested indicator services
systemd.user.targets."ayatana-indicators" =
systemd.user.targets =
let
indicatorServices = lib.lists.flatten
(map
(pkg:
(map (ind: "${ind}.service") pkg.passthru.ayatana-indicators))
cfg.packages);
indicatorServices = lib.lists.flatten (
map (pkg: (map (ind: "${ind}.service") pkg.passthru.ayatana-indicators)) cfg.packages
);
in
{
description = "Target representing the lifecycle of the Ayatana Indicators. Each indicator should be bound to it in its individual service file";
partOf = [ "graphical-session.target" ];
wants = indicatorServices;
before = indicatorServices;
};
lib.attrsets.mapAttrs
(_: desc: {
description = "Target representing the lifecycle of the ${desc}. Each indicator should be bound to it in its individual service file";
partOf = [ "graphical-session.target" ];
wants = indicatorServices;
before = indicatorServices;
})
{
ayatana-indicators = "Ayatana Indicators";
lomiri-indicators = "Ayatana/Lomiri Indicators that shall be run in Lomiri";
};
};
meta.maintainers = with lib.maintainers; [ OPNA2608 ];