1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-05 02:39:45 +01:00
home-manager/modules/services/blueman-applet.nix
Nick Hu 4f70f49cec
Add systemd target tray.target (#2027)
This target is for systemd units that require a system tray to be
running.

This also fixes taffybar.service: previously, systemd would consider it
to be active (running) before it was actually ready to accept tray
icons.
2021-05-22 03:15:12 +01:00

37 lines
1,005 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
options = {
services.blueman-applet = {
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>
'';
};
};
};
config = mkIf config.services.blueman-applet.enable {
systemd.user.services.blueman-applet = {
Unit = {
Description = "Blueman applet";
Requires = [ "tray.target" ];
After = [ "graphical-session-pre.target" "tray.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = { WantedBy = [ "graphical-session.target" ]; };
Service = { ExecStart = "${pkgs.blueman}/bin/blueman-applet"; };
};
};
}