ldap: fix defaults of options

This commit is contained in:
Sandro - 2024-01-08 00:40:25 +01:00
parent 2898c47279
commit 18dce2000c
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 4 additions and 3 deletions

View File

@ -8,9 +8,9 @@ in
type = lib.types.submodule {
options = {
bindDN = lib.mkOption {
type = lib.types.str;
type = with lib.types; nullOr str;
example = "uid=search";
default = "uid=${cfg.searchUID}";
default = if cfg.searchUID != null then "uid=${cfg.searchUID}" else null;
apply = s: s + "," + cfg.userBaseDN;
description = lib.mdDoc ''
The DN of the service user used by services.
@ -89,7 +89,8 @@ in
};
searchUID = lib.mkOption {
type = lib.types.str;
type = with lib.types; nullOr str;
default = null;
example = "search";
description = lib.mdDoc "The uid of the service user used by services, often referred as search user.";
};