From 5c701b6878b5050d802756e19d3adcc1d31b0507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Tue, 16 Jan 2024 22:38:17 +0200 Subject: [PATCH] systemd service: fix serviceConfig --- modules/e11sync/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/e11sync/default.nix b/modules/e11sync/default.nix index 59209ce..24dcebb 100644 --- a/modules/e11sync/default.nix +++ b/modules/e11sync/default.nix @@ -36,7 +36,7 @@ e11sync-backend: { E11SYNC_SECRET_KEY_PATH = "/run/credentials/secret_key"; }; wantedBy = ["multi-user.target"]; - serviceConfig = + serviceConfig = lib.mkMerge [ { Type = "notify"; NotifyAccess = "all"; @@ -53,9 +53,10 @@ e11sync-backend: { ProtectKernelTunables = true; ProtectControlGroups = true; } - // lib.mkIf cfg.migrateOnStart { + (lib.mkIf cfg.migrateOnStart { ExecStartPre = "${pkg-backend}/bin/e11sync migrate"; - }; + }) + ]; }; }; };