2017-09-12 14:26:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
services.blueman-applet = {
|
2023-07-01 23:45:18 +00:00
|
|
|
enable = mkEnableOption "" // {
|
|
|
|
description = ''
|
2019-12-25 21:00:54 +00:00
|
|
|
Whether to enable the Blueman applet.
|
2023-07-01 07:48:09 +00:00
|
|
|
|
|
|
|
Note that for the applet to work, the `blueman` service should
|
2019-12-25 21:00:54 +00:00
|
|
|
be enabled system-wide. You can enable it in the system
|
|
|
|
configuration using
|
2023-07-01 07:48:09 +00:00
|
|
|
```nix
|
|
|
|
services.blueman.enable = true;
|
|
|
|
```
|
2019-12-25 21:00:54 +00:00
|
|
|
'';
|
|
|
|
};
|
2017-09-12 14:26:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.services.blueman-applet.enable {
|
2022-04-24 14:25:54 +00:00
|
|
|
assertions = [
|
|
|
|
(hm.assertions.assertPlatform "services.blueman-applet" pkgs
|
|
|
|
platforms.linux)
|
|
|
|
];
|
|
|
|
|
2017-09-12 14:26:52 +00:00
|
|
|
systemd.user.services.blueman-applet = {
|
2020-02-01 23:39:17 +00:00
|
|
|
Unit = {
|
|
|
|
Description = "Blueman applet";
|
2021-05-22 02:15:12 +00:00
|
|
|
Requires = [ "tray.target" ];
|
|
|
|
After = [ "graphical-session-pre.target" "tray.target" ];
|
2020-02-01 23:39:17 +00:00
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
2017-09-12 14:26:52 +00:00
|
|
|
|
2020-02-01 23:39:17 +00:00
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
2017-09-12 14:26:52 +00:00
|
|
|
|
2020-02-01 23:39:17 +00:00
|
|
|
Service = { ExecStart = "${pkgs.blueman}/bin/blueman-applet"; };
|
2017-09-12 14:26:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|