2023-01-28 20:49:10 +00:00
|
|
|
pkgs: {
|
2022-05-05 23:43:31 +00:00
|
|
|
Unit = {
|
|
|
|
Description = "Swaync notification daemon";
|
|
|
|
Documentation = "https://github.com/ErikReider/SwayNotificationCenter";
|
2023-01-28 20:49:10 +00:00
|
|
|
BindsTo = [ "sway-session.target" ];
|
|
|
|
After = [ "sway-session.target" ];
|
|
|
|
Requisite = [ "graphical-session.target" ];
|
2022-05-05 23:43:31 +00:00
|
|
|
# ConditionEnvironment requires systemd v247 to work correctly
|
2023-01-28 20:49:10 +00:00
|
|
|
ConditionEnvironment = [ "WAYLAND_DISPLAY" ];
|
2022-05-05 23:43:31 +00:00
|
|
|
};
|
|
|
|
Service = {
|
|
|
|
Type = "dbus";
|
|
|
|
BusName = "org.freedesktop.Notifications";
|
|
|
|
ExecStart = "${pkgs.swaynotificationcenter}/bin/swaync";
|
|
|
|
ExecReload = "${pkgs.swaynotificationcenter}/bin/swaync-client --reload-config ; ${pkgs.swaynotificationcenter}/bin/swaync-client --reload-css";
|
|
|
|
Restart = "on-failure";
|
|
|
|
};
|
|
|
|
Install = {
|
2023-01-28 20:49:10 +00:00
|
|
|
WantedBy = [ "sway-session.target" ];
|
2022-05-05 23:43:31 +00:00
|
|
|
};
|
|
|
|
}
|