2020-10-12 00:22:58 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
services.blueman-applet = {
|
|
|
|
enable = mkEnableOption "" // {
|
|
|
|
description = ''
|
|
|
|
Whether to enable the Blueman applet.
|
2023-08-08 10:19:01 +00:00
|
|
|
|
|
|
|
Note that for the applet to work, the `blueman` service should
|
2020-10-12 00:22:58 +00:00
|
|
|
be enabled system-wide. You can enable it in the system
|
|
|
|
configuration using
|
2023-08-08 10:19:01 +00:00
|
|
|
```nix
|
|
|
|
services.blueman.enable = true;
|
|
|
|
```
|
2020-10-12 00:22:58 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.services.blueman-applet.enable {
|
2023-08-08 10:19:01 +00:00
|
|
|
assertions = [
|
|
|
|
(hm.assertions.assertPlatform "services.blueman-applet" pkgs
|
|
|
|
platforms.linux)
|
|
|
|
];
|
|
|
|
|
2020-10-12 00:22:58 +00:00
|
|
|
systemd.user.services.blueman-applet = {
|
|
|
|
Unit = {
|
|
|
|
Description = "Blueman applet";
|
2021-07-02 22:36:30 +00:00
|
|
|
Requires = [ "tray.target" ];
|
|
|
|
After = [ "graphical-session-pre.target" "tray.target" ];
|
2020-10-12 00:22:58 +00:00
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
|
|
|
|
|
|
Service = { ExecStart = "${pkgs.blueman}/bin/blueman-applet"; };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|