2017-01-07 19:16:26 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
2017-09-26 23:40:31 +02:00
|
|
|
meta.maintainers = [ maintainers.rycee ];
|
|
|
|
|
2017-01-07 19:16:26 +01:00
|
|
|
options = {
|
|
|
|
services.dunst = {
|
|
|
|
enable = mkEnableOption "the dunst notification daemon";
|
|
|
|
|
|
|
|
settings = mkOption {
|
|
|
|
type = types.attrs;
|
|
|
|
default = {};
|
|
|
|
description = "Configuration written to ~/.config/dunstrc";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.services.dunst.enable {
|
2017-01-20 00:20:25 +01:00
|
|
|
home.file.".local/share/dbus-1/services/org.knopwob.dunst.service".source =
|
|
|
|
"${pkgs.dunst}/share/dbus-1/services/org.knopwob.dunst.service";
|
2017-01-07 19:16:26 +01:00
|
|
|
|
2017-01-20 00:20:25 +01:00
|
|
|
systemd.user.services.dunst = {
|
|
|
|
Unit = {
|
|
|
|
Description = "Dunst notification daemon";
|
2017-06-26 18:34:09 +02:00
|
|
|
After = [ "graphical-session-pre.target" ];
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
2017-01-20 00:20:25 +01:00
|
|
|
};
|
2017-01-07 19:16:26 +01:00
|
|
|
|
2017-01-20 00:20:25 +01:00
|
|
|
Service = {
|
|
|
|
Type = "dbus";
|
|
|
|
BusName = "org.freedesktop.Notifications";
|
|
|
|
ExecStart = "${pkgs.dunst}/bin/dunst";
|
|
|
|
};
|
2017-01-07 19:16:26 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|