mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-09 03:56:04 +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:
parent
3c3510e61c
commit
282b4c98de
1 changed files with 16 additions and 6 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue