aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/services/blueman-applet.nix
blob: 186dc7454f919b17e0d288d56bd9a2a66ed6c226 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ config, lib, pkgs, ... }:

with lib;

{
  options = {
    services.blueman-applet = {
      enable = mkEnableOption ''
        Blueman applet.

        Note, for the applet to work, 'blueman' package should also be installed system-wide
        since it requires running 'blueman-mechanism' service activated via dbus.
        You can add it to the dbus packages in system configuration:

          services.dbus.packages = [ pkgs.blueman ];
      '';
    };
  };

  config = mkIf config.services.blueman-applet.enable {
    systemd.user.services.blueman-applet = {
        Unit = {
          Description = "Blueman applet";
          After = [ "graphical-session-pre.target" ];
          PartOf = [ "graphical-session.target" ];
        };

        Install = {
          WantedBy = [ "graphical-session.target" ];
        };

        Service = {
          ExecStart = "${pkgs.blueman}/bin/blueman-applet";
        };
    };
  };
}