about summary refs log tree commit diff
path: root/nixos/modules/services/logging/logrotate.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/logging/logrotate.nix')
-rw-r--r--nixos/modules/services/logging/logrotate.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/nixos/modules/services/logging/logrotate.nix b/nixos/modules/services/logging/logrotate.nix
index b056f96c3630..342ac5ec6e04 100644
--- a/nixos/modules/services/logging/logrotate.nix
+++ b/nixos/modules/services/logging/logrotate.nix
@@ -83,9 +83,8 @@ let
   };
 
   mailOption =
-    if foldr (n: a: a || (n.mail or false) != false) false (attrValues cfg.settings)
-    then "--mail=${pkgs.mailutils}/bin/mail"
-    else "";
+    optionalString (foldr (n: a: a || (n.mail or false) != false) false (attrValues cfg.settings))
+    "--mail=${pkgs.mailutils}/bin/mail";
 in
 {
   imports = [