From daa141ef05cec1e576f139d49cb41167d6be0951 Mon Sep 17 00:00:00 2001 From: Leon Schuermann Date: Sun, 2 Feb 2025 09:44:47 -0500 Subject: [PATCH] mail-server/dovecot: check if quota is non-null instead of string This check will avoid silently dropping the quota setting when set to a non-string value, and instead yield an evaluation error when e.g., setting it to a number or other type. Suggested-by: Sandro --- mail-server/dovecot.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail-server/dovecot.nix b/mail-server/dovecot.nix index e0efaff..48de338 100644 --- a/mail-server/dovecot.nix +++ b/mail-server/dovecot.nix @@ -125,7 +125,7 @@ let cat < ${userdbFile} ${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: value: "${name}:::::::" - + (if lib.isString value.quota + + (if value.quota != null then "userdb_quota_rule=*:storage=${value.quota}" else "") ) cfg.loginAccounts)}