fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Robert HelgessonMerge PR #421575790441

master
1.0 KiB42 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5{
6  options = {
7    services.blueman-applet = {
8      enable = mkEnableOption "" // {
9        description = ''
10          Whether to enable the Blueman applet.
11
12          Note that for the applet to work, the `blueman` service should
13          be enabled system-wide. You can enable it in the system
14          configuration using
15          ```nix
16          services.blueman.enable = true;
17          ```
18        '';
19      };
20    };
21  };
22
23  config = mkIf config.services.blueman-applet.enable {
24    assertions = [
25      (hm.assertions.assertPlatform "services.blueman-applet" pkgs
26        platforms.linux)
27    ];
28
29    systemd.user.services.blueman-applet = {
30      Unit = {
31        Description = "Blueman applet";
32        Requires = [ "tray.target" ];
33        After = [ "graphical-session-pre.target" "tray.target" ];
34        PartOf = [ "graphical-session.target" ];
35      };
36
37      Install = { WantedBy = [ "graphical-session.target" ]; };
38
39      Service = { ExecStart = "${pkgs.blueman}/bin/blueman-applet"; };
40    };
41  };
42}