mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2025-05-25 20:10:49 +05:00
Merge branch 'ldap-domains' into 'master'
Allow to restrict ldap domains users are allowed to use See merge request simple-nixos-mailserver/nixos-mailserver!397
This commit is contained in:
commit
5f8a505e9f
@ -210,6 +210,15 @@ in
|
||||
ldap = {
|
||||
enable = mkEnableOption "LDAP support";
|
||||
|
||||
domains = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = config.mailserver.domains;
|
||||
example = ''[ "example.com" "example.org" ]'';
|
||||
description = ''
|
||||
Domains which ldap users are allowed to use.
|
||||
'';
|
||||
};
|
||||
|
||||
uris = mkOption {
|
||||
type = types.listOf types.str;
|
||||
example = literalExpression ''
|
||||
|
@ -150,6 +150,7 @@ let
|
||||
tls_ca_cert_file = ${cfg.ldap.tlsCAFile}
|
||||
tls_require_cert = yes
|
||||
|
||||
domain = ${lib.concatStringsSep ", " cfg.ldap.domains}
|
||||
search_base = ${cfg.ldap.searchBase}
|
||||
scope = ${cfg.ldap.searchScope}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user