1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

blueman-applet: Add option to change systemd targets (#7702)

Introduce new option for a customizable systemd targets to allow enabling
the applet only in certain environments.
This commit is contained in:
Vladislav Grechannik 2025-08-21 07:48:42 +02:00 committed by GitHub
parent 3c3510e61c
commit 282b4c98de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,6 +24,19 @@ in
};
package = lib.mkPackageOption pkgs "blueman" { };
systemdTargets = lib.mkOption {
type = with lib.types; listOf str;
default = [ "graphical-session.target" ];
example = [ "sway-session.target" ];
description = ''
The systemd targets that will automatically start the cliphist service.
When setting this value to `["sway-session.target"]`,
make sure to also enable {option}`wayland.windowManager.sway.systemd.enable`,
otherwise the service may never be started.
'';
};
};
};
@ -36,15 +49,12 @@ in
Unit = {
Description = "Blueman applet";
Requires = [ "tray.target" ];
After = [
"graphical-session.target"
"tray.target"
];
PartOf = [ "graphical-session.target" ];
After = cfg.systemdTargets ++ [ "tray.target" ];
PartOf = cfg.systemdTargets;
};
Install = {
WantedBy = [ "graphical-session.target" ];
WantedBy = cfg.systemdTargets;
};
Service = {