From 35e0a339f8c14aed2c3e7230850b026befc02dc9 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Fri, 20 Jan 2017 00:20:25 +0100 Subject: [PATCH] dunst: support dbus activation --- modules/services/dunst.nix | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/modules/services/dunst.nix b/modules/services/dunst.nix index 4d866cec3..a70e8d311 100644 --- a/modules/services/dunst.nix +++ b/modules/services/dunst.nix @@ -16,20 +16,21 @@ with lib; }; config = mkIf config.services.dunst.enable { + home.file.".local/share/dbus-1/services/org.knopwob.dunst.service".source = + "${pkgs.dunst}/share/dbus-1/services/org.knopwob.dunst.service"; + systemd.user.services.dunst = { - Unit = { - Description = "Dunst notification daemon"; - }; + Unit = { + Description = "Dunst notification daemon"; + Requires = "graphical-session.target"; + After = "graphical-session.target"; + }; - Install = { - WantedBy = [ "graphical-session.target" ]; - }; - - Service = { - # Type = "dbus"; - # BusName = "org.freedesktop.Notifications"; - ExecStart = "${pkgs.dunst}/bin/dunst"; - }; + Service = { + Type = "dbus"; + BusName = "org.freedesktop.Notifications"; + ExecStart = "${pkgs.dunst}/bin/dunst"; + }; }; }; }