swaync: ship as own service
This commit is contained in:
parent
ccb11a4ecf
commit
4c08609824
|
@ -64,7 +64,7 @@
|
|||
# i'm using means that target's never reached...
|
||||
# TODO: might want `ConditionUser=!@system`
|
||||
|
||||
serviceConfig.ExecStart = "${pkgs.mako}/bin/mako";
|
||||
serviceConfig.ExecStart = "${config.sane.programs.mako.package}/bin/mako";
|
||||
serviceConfig.Type = "simple";
|
||||
# mako will predictably fail if launched before the wayland server is fully initialized
|
||||
serviceConfig.Restart = "on-failure";
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# - examples:
|
||||
# - thread: <https://github.com/ErikReider/SwayNotificationCenter/discussions/183>
|
||||
# - buttons-grid and menubar: <https://gist.github.com/JannisPetschenka/fb00eec3efea9c7fff8c38a01ce5d507>
|
||||
{ ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
sane.programs.swaynotificationcenter = {
|
||||
fs.".config/swaync/style.css".symlink.text = ''
|
||||
|
@ -129,4 +129,18 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: give `sane.programs` native support for defining services
|
||||
systemd.user.services.swaync = lib.mkIf config.sane.programs.swaynotificationcenter.enabled {
|
||||
# swaync ships its own service, but i want to add `environment` variables and flags for easier debugging.
|
||||
# seems that's not possible without defining an entire nix-native service (i.e. this).
|
||||
description = "Swaync desktop notification daemon";
|
||||
wantedBy = [ "default.target" ];
|
||||
serviceConfig.ExecStart = "${config.sane.programs.swaynotificationcenter.package}/bin/swaync";
|
||||
serviceConfig.Type = "dbus";
|
||||
serviceConfig.BusName = "org.freedesktop.Notifications";
|
||||
serviceConfig.Restart = "on-failure";
|
||||
serviceConfig.RestartSec = "10s";
|
||||
environment.G_MESSAGES_DEBUG = "all";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user