From f878c8994f5e0e2dda73fc347940e439080ee2a7 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Fri, 10 Jun 2022 08:21:28 +0900 Subject: [PATCH] logrotate: do not add mail if 'mail = false' is specified Reported-by: Ricardo M. Correia --- nixos/modules/services/logging/logrotate.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/logging/logrotate.nix b/nixos/modules/services/logging/logrotate.nix index e6eb0552c9e..dfc58d7d539 100644 --- a/nixos/modules/services/logging/logrotate.nix +++ b/nixos/modules/services/logging/logrotate.nix @@ -193,7 +193,7 @@ let }; mailOption = - if foldr (n: a: a || n ? mail) false (attrValues cfg.settings) + if foldr (n: a: a || (n.mail or false) != false) false (attrValues cfg.settings) then "--mail=${pkgs.mailutils}/bin/mail" else ""; in