fix auth: config.selfprivacy.modules.auth.enable or false
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
let
|
||||
inherit (import ./common.nix nixos-args)
|
||||
appendLdapBindPwd
|
||||
auth-passthru
|
||||
cfg
|
||||
domain
|
||||
auth-passthru
|
||||
is-auth-enabled
|
||||
;
|
||||
|
||||
runtime-directory = "dovecot2";
|
||||
@@ -61,7 +62,7 @@ let
|
||||
'';
|
||||
};
|
||||
in
|
||||
lib.mkIf config.selfprivacy.modules.auth.enable {
|
||||
lib.mkIf is-auth-enabled {
|
||||
mailserver.ldap = {
|
||||
# note: in `ldapsearch` first comes filter, then attributes
|
||||
dovecot.userAttrs = "+"; # all operational attributes
|
||||
|
@@ -3,6 +3,7 @@ let
|
||||
inherit (import ./common.nix nixos-args)
|
||||
appendLdapBindPwd
|
||||
auth-passthru
|
||||
is-auth-enabled
|
||||
;
|
||||
|
||||
cfg = config.mailserver;
|
||||
@@ -50,7 +51,7 @@ let
|
||||
destination = ldapVirtualMailboxMapFile;
|
||||
};
|
||||
in
|
||||
lib.mkIf config.selfprivacy.modules.auth.enable {
|
||||
lib.mkIf is-auth-enabled {
|
||||
mailserver.ldap = {
|
||||
postfix.mailAttribute = "mail";
|
||||
postfix.uidAttribute = "uid";
|
||||
|
@@ -2,7 +2,7 @@
|
||||
rec {
|
||||
auth-passthru = config.passthru.selfprivacy.auth;
|
||||
domain = config.selfprivacy.domain;
|
||||
is-auth-enabled = config.selfprivacy.modules.auth.enable;
|
||||
is-auth-enabled = config.selfprivacy.modules.auth.enable or false;
|
||||
|
||||
appendLdapBindPwd =
|
||||
{ name, file, prefix, suffix ? "", passwordFile, destination }:
|
||||
|
Reference in New Issue
Block a user