diff --git a/default.nix b/default.nix index 6bd499c..45875a3 100644 --- a/default.nix +++ b/default.nix @@ -277,7 +277,7 @@ in dovecot = { userAttrs = mkOption { - type = types.str; + type = types.nullOr types.str; default = ""; description = '' LDAP attributes to be retrieved during userdb lookups. diff --git a/mail-server/dovecot.nix b/mail-server/dovecot.nix index a6251fd..11f2708 100644 --- a/mail-server/dovecot.nix +++ b/mail-server/dovecot.nix @@ -76,7 +76,7 @@ let auth_bind = yes base = ${cfg.ldap.searchBase} scope = ${mkLdapSearchScope cfg.ldap.searchScope} - ${lib.optionalString (cfg.ldap.dovecot.userAttrs != "") '' + ${lib.optionalString (cfg.ldap.dovecot.userAttrs != null) '' user_attrs = ${cfg.ldap.dovecot.userAttrs} ''} user_filter = ${cfg.ldap.dovecot.userFilter}