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:
parent
3c3510e61c
commit
282b4c98de
1 changed files with 16 additions and 6 deletions
|
|
@ -24,6 +24,19 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
package = lib.mkPackageOption pkgs "blueman" { };
|
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 = {
|
Unit = {
|
||||||
Description = "Blueman applet";
|
Description = "Blueman applet";
|
||||||
Requires = [ "tray.target" ];
|
Requires = [ "tray.target" ];
|
||||||
After = [
|
After = cfg.systemdTargets ++ [ "tray.target" ];
|
||||||
"graphical-session.target"
|
PartOf = cfg.systemdTargets;
|
||||||
"tray.target"
|
|
||||||
];
|
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Install = {
|
Install = {
|
||||||
WantedBy = [ "graphical-session.target" ];
|
WantedBy = cfg.systemdTargets;
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue