0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/openldap: Support configuring the log level

This commit is contained in:
Janne Heß 2018-12-06 15:43:50 +01:00
parent 3d4cb55b71
commit 3c54d6b2f8

View file

@ -54,6 +54,13 @@ in
description = "The database directory."; description = "The database directory.";
}; };
logLevel = mkOption {
type = types.str;
default = "0";
example = "acl trace";
description = "The log level selector of slapd.";
};
configDir = mkOption { configDir = mkOption {
type = types.nullOr types.path; type = types.nullOr types.path;
default = null; default = null;
@ -139,7 +146,7 @@ in
chown -R "${cfg.user}:${cfg.group}" "${cfg.dataDir}" chown -R "${cfg.user}:${cfg.group}" "${cfg.dataDir}"
''; '';
serviceConfig.ExecStart = serviceConfig.ExecStart =
"${openldap.out}/libexec/slapd -d 0 " + "${openldap.out}/libexec/slapd -d ${cfg.logLevel} " +
"-u '${cfg.user}' -g '${cfg.group}' " + "-u '${cfg.user}' -g '${cfg.group}' " +
"-h '${concatStringsSep " " cfg.urlList}' " + "-h '${concatStringsSep " " cfg.urlList}' " +
"${configOpts}"; "${configOpts}";