summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/niri/mako.nix
blob: 8abf14d81a09b4cde239718f928099df51f5d6b7 (plain)
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
49
50
{ config, lib, ... }:
{
  config = {
    services.mako = {
      enable = true;
      font = "Fira Sans 10";
      format = "<i>%s</i>\\n%b";
      margin = "2";
      maxVisible = -1;
      backgroundColor = "#000000dd";
      progressColor = "source #223544ff";
      width = 384;
      extraConfig = ''
        outer-margin=1
        max-history=100

        [grouped]
        format=<b>(%g)</b> <i>%s</i>\n%b

        [urgency=low]
        text-color=#999999ff

        [urgency=critical]
        background-color=#900000dd

        [app-name=Element]
        group-by=summary

        [mode=silent]
        invisible=1
      '';
    };
    systemd.user.services.mako = {
      Unit = {
        Description = "Mako notification daemon";
        PartOf = [ "graphical-session.target" ];
      };
      Install = {
        WantedBy = [ "graphical-session.target" ];
      };
      Service = {
        Type = "dbus";
        BusName = "org.freedesktop.Notifications";
        ExecStart = lib.getExe config.services.mako.package;
        RestartSec = 5;
        Restart = "always";
      };
    };
  };
}