From 7666eadc69167dc1a49e7f1cf4cf3f237037db19 Mon Sep 17 00:00:00 2001 From: Bruno Bigras Date: Sat, 27 Apr 2024 00:43:13 -0400 Subject: [PATCH] nixos/promtail: check-syntax in preStart Co-authored-by: Pol Dellaiera --- nixos/modules/services/logging/promtail.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/services/logging/promtail.nix b/nixos/modules/services/logging/promtail.nix index a34bc07b6ab2..9eccd34cef23 100644 --- a/nixos/modules/services/logging/promtail.nix +++ b/nixos/modules/services/logging/promtail.nix @@ -41,6 +41,10 @@ in { wantedBy = [ "multi-user.target" ]; stopIfChanged = false; + preStart = '' + ${lib.getExe pkgs.promtail} -config.file=${prettyJSON cfg.configuration} -check-syntax + ''; + serviceConfig = { Restart = "on-failure"; TimeoutStopSec = 10;