2017-09-12 16:26:52 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
services.blueman-applet = {
|
2019-12-25 22:00:54 +01:00
|
|
|
enable = mkEnableOption "" // {
|
|
|
|
description = ''
|
|
|
|
Whether to enable the Blueman applet.
|
|
|
|
</para><para>
|
|
|
|
Note, for the applet to work, the 'blueman' service should
|
|
|
|
be enabled system-wide. You can enable it in the system
|
|
|
|
configuration using
|
|
|
|
<programlisting language="nix">
|
|
|
|
services.blueman.enable = true;
|
|
|
|
</programlisting>
|
|
|
|
'';
|
|
|
|
};
|
2017-09-12 16:26:52 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.services.blueman-applet.enable {
|
|
|
|
systemd.user.services.blueman-applet = {
|
2020-02-02 00:39:17 +01:00
|
|
|
Unit = {
|
|
|
|
Description = "Blueman applet";
|
|
|
|
After = [ "graphical-session-pre.target" ];
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
2017-09-12 16:26:52 +02:00
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
2017-09-12 16:26:52 +02:00
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
Service = { ExecStart = "${pkgs.blueman}/bin/blueman-applet"; };
|
2017-09-12 16:26:52 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|