-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathblueberry.nix
48 lines (45 loc) · 1.07 KB
/
blueberry.nix
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
38
39
40
41
42
43
44
45
46
47
48
{
config,
lib,
pkgs,
...
}:
with lib;
{
options = {
services.blueberry = {
enable = mkEnableOption "" // {
description = ''
Whether to enable the blueberry applet.
</para><para>
Note, for the applet to work, the 'blueberry' service should
be enabled system-wide. You can enable it in the system
configuration using
<programlisting language="nix">
services.blueberry.enable = true;
</programlisting>
'';
};
};
};
config = mkIf config.services.blueberry.enable {
home.packages = [ pkgs.blueberry ];
systemd.user.services.blueberry = {
Unit = {
Description = "blueberry applet";
Requires = [ "tray.target" ];
After = [
"graphical-session-pre.target"
"tray.target"
];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${pkgs.blueberry}/bin/blueberry";
};
};
};
}