mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2025-05-25 20:10:49 +05:00
Allow to restrict ldap domains users are allowed to use
This commit is contained in:
parent
433520257a
commit
e337ce91ff
@ -210,6 +210,15 @@ in
|
|||||||
ldap = {
|
ldap = {
|
||||||
enable = mkEnableOption "LDAP support";
|
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 {
|
uris = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
|
@ -150,6 +150,7 @@ let
|
|||||||
tls_ca_cert_file = ${cfg.ldap.tlsCAFile}
|
tls_ca_cert_file = ${cfg.ldap.tlsCAFile}
|
||||||
tls_require_cert = yes
|
tls_require_cert = yes
|
||||||
|
|
||||||
|
domain = ${lib.concatStringsSep ", " cfg.ldap.domains}
|
||||||
search_base = ${cfg.ldap.searchBase}
|
search_base = ${cfg.ldap.searchBase}
|
||||||
scope = ${cfg.ldap.searchScope}
|
scope = ${cfg.ldap.searchScope}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user