Unverified Commit e63ec0c6 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

nixos/blueman: Add option to enable Blueman tray applet (#475107)

parents 6e25042c edee972a
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -13,6 +13,12 @@ in
  options = {
    services.blueman = {
      enable = lib.mkEnableOption "blueman, a bluetooth manager";

      withApplet = lib.mkOption {
        type = lib.types.bool;
        default = true;
        description = "Whether to spawn the Blueman tray applet.";
      };
    };
  };

@@ -24,5 +30,15 @@ in
    services.dbus.packages = [ pkgs.blueman ];

    systemd.packages = [ pkgs.blueman ];

    systemd.user.services.blueman-applet = lib.mkIf cfg.withApplet {
      description = "Blueman tray applet";
      wantedBy = [ "graphical-session.target" ];
      partOf = [ "graphical-session.target" ];
      serviceConfig = {
        ExecStart = "${pkgs.blueman}/bin/blueman-applet";
        Restart = "on-failure";
      };
    };
  };
}