From 743f669b8c1221f35826a7d6d74c89a132c5eea2 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 6 Sep 2023 04:53:31 +0000 Subject: [PATCH] mako: disable the dbus service so our systemd service can take control --- hosts/common/programs/mako.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hosts/common/programs/mako.nix b/hosts/common/programs/mako.nix index ab9fd38cf..497dda574 100644 --- a/hosts/common/programs/mako.nix +++ b/hosts/common/programs/mako.nix @@ -3,6 +3,12 @@ { lib, config, pkgs, ... }: { sane.programs.mako = { + package = pkgs.mako.overrideAttrs (upstream: { + postInstall = (upstream.postInstall or "") + '' + # we control mako as a systemd service, so have dbus not automatically activate it. + rm $out/share/dbus-1/services/fr.emersion.mako.service + ''; + }); fs.".config/mako/config".symlink.text = '' # notification interaction mapping # "on-touch" defaults to "dismiss", which isn't nice for touchscreens. @@ -60,10 +66,8 @@ serviceConfig.ExecStart = "${pkgs.mako}/bin/mako"; serviceConfig.Type = "simple"; + # mako will predictably fail if launched before the wayland server is fully initialized serviceConfig.Restart = "on-failure"; serviceConfig.RestartSec = "10s"; - - # don't start mako until after sway - preStart = ''test -n "$SWAYSOCK"''; }; }