openldap: set configDir as null

fixes an error #19794 with this new option f3404b7 when using plain configuration files
This commit is contained in:
Kranium Gikos Mendoza 2016-10-23 11:55:23 +00:00
parent a4e43841a2
commit 1e3f622dbd

View File

@ -55,7 +55,7 @@ in
configDir = mkOption { configDir = mkOption {
type = types.path; type = types.path;
default = ""; default = null;
description = "Use this optional config directory instead of using slapd.conf"; description = "Use this optional config directory instead of using slapd.conf";
example = "/var/db/slapd.d"; example = "/var/db/slapd.d";
}; };
@ -103,7 +103,7 @@ in
mkdir -p ${cfg.dataDir} mkdir -p ${cfg.dataDir}
chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir} chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}
''; '';
serviceConfig.ExecStart = "${openldap.out}/libexec/slapd -u ${cfg.user} -g ${cfg.group} -d 0 -h \"${concatStringsSep " " cfg.urlList}\" ${if cfg.configDir == "" then "-f "+configFile else "-F "+cfg.configDir}"; serviceConfig.ExecStart = "${openldap.out}/libexec/slapd -u ${cfg.user} -g ${cfg.group} -d 0 -h \"${concatStringsSep " " cfg.urlList}\" ${if cfg.configDir == null then "-f "+configFile else "-F "+cfg.configDir}";
}; };
users.extraUsers.openldap = users.extraUsers.openldap =