aboutsummaryrefslogtreecommitdiff
path: root/modules/hosts/desktop/dunst.nix
blob: 4c5f74e317ef1e631d85afa372734fb124a83225 (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
{
  config,
  lib,
  pkgs,
  username,
  ...
}:

let
  inherit (lib) mkEnableOption mkIf;
  cfg = config.nx.desktop.dunst;
in
{
  options.nx.desktop.dunst.enable = mkEnableOption "Enable dunst notification";
  config = mkIf cfg.enable {
    home-manager.users.${username} = {
      home.packages = with pkgs; [
        libnotify
      ];

      services.dunst = {
        enable = true;
        settings = {
          global = {
            font = "monospace 10";
            offset = "(15, 15)";
            frame_width = 0;
          };
          urgency_low = {
            foreground = "#FFFFFF";
            background = "#000000E6";
          };

          urgency_normal = {
            foreground = "#FFFFFF";
            background = "#000000E6";
          };

          urgency_critical = {
            foreground = "#FFFFFF";
            background = "#000000E6";
          };
        };
      };
    };
  };
}