summary refs log tree commit diff
path: root/nixos/modules/services/logging
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2022-06-10 08:21:28 +0900
committerDominique Martinet <asmadeus@codewreck.org>2022-06-13 08:57:49 +0900
commitf878c8994f5e0e2dda73fc347940e439080ee2a7 (patch)
tree3bccc84774aac39fbb88d61010101f8ef3b34725 /nixos/modules/services/logging
parent72b1ec0a79b1fc50f6cc0694c2f0b1eb384a932e (diff)
downloadnixpkgs-f878c8994f5e0e2dda73fc347940e439080ee2a7.tar
nixpkgs-f878c8994f5e0e2dda73fc347940e439080ee2a7.tar.gz
nixpkgs-f878c8994f5e0e2dda73fc347940e439080ee2a7.tar.bz2
nixpkgs-f878c8994f5e0e2dda73fc347940e439080ee2a7.tar.lz
nixpkgs-f878c8994f5e0e2dda73fc347940e439080ee2a7.tar.xz
nixpkgs-f878c8994f5e0e2dda73fc347940e439080ee2a7.tar.zst
nixpkgs-f878c8994f5e0e2dda73fc347940e439080ee2a7.zip
logrotate: do not add mail if 'mail = false' is specified
Reported-by: Ricardo M. Correia <rcorreia@wizy.org>
Diffstat (limited to 'nixos/modules/services/logging')
-rw-r--r--nixos/modules/services/logging/logrotate.nix2
1 files changed, 1 insertions, 1 deletions
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