From 802b3cb2d45ad66619ea8ad19b280baa460556d2 Mon Sep 17 00:00:00 2001 From: Muhammad Talal Anwar Date: Sat, 19 Oct 2024 09:01:11 +0200 Subject: [PATCH] espanso: use `launcher` command on Linux The source uses `launcher` instead of `daemon`. Additionally we remove `Type` and add `RestartSec` as defined in the source: https://github.com/espanso/espanso/blob/b421bcf73fa13506938d62425459d6c16c6a8d0a/espanso/src/res/linux/systemd.service#L5-L7C1 --- modules/services/espanso.nix | 4 ++-- tests/modules/services/espanso/basic-configuration.service | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/services/espanso.nix b/modules/services/espanso.nix index f6e27e796..dbfa05875 100644 --- a/modules/services/espanso.nix +++ b/modules/services/espanso.nix @@ -121,9 +121,9 @@ in { systemd.user.services.espanso = { Unit = { Description = "Espanso: cross platform text expander in Rust"; }; Service = { - Type = "exec"; - ExecStart = "${cfg.package}/bin/espanso daemon"; + ExecStart = "${cfg.package}/bin/espanso launcher"; Restart = "on-failure"; + RestartSec = 3; }; Install = { WantedBy = [ "default.target" ]; }; }; diff --git a/tests/modules/services/espanso/basic-configuration.service b/tests/modules/services/espanso/basic-configuration.service index 593196e59..2c07465a0 100644 --- a/tests/modules/services/espanso/basic-configuration.service +++ b/tests/modules/services/espanso/basic-configuration.service @@ -2,9 +2,9 @@ WantedBy=default.target [Service] -ExecStart=@espanso@/bin/espanso daemon +ExecStart=@espanso@/bin/espanso launcher Restart=on-failure -Type=exec +RestartSec=3 [Unit] Description=Espanso: cross platform text expander in Rust