mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
Add configDir option
This commit is contained in:
parent
66d622fbd0
commit
f3404b71a7
@ -53,6 +53,13 @@ in
|
|||||||
description = "The database directory.";
|
description = "The database directory.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
configDir = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
default = "";
|
||||||
|
description = "Use this optional config directory instead of using slapd.conf";
|
||||||
|
example = "/var/db/slapd.d";
|
||||||
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
@ -96,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}\" -f ${configFile}";
|
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}";
|
||||||
};
|
};
|
||||||
|
|
||||||
users.extraUsers.openldap =
|
users.extraUsers.openldap =
|
||||||
|
Loading…
Reference in New Issue
Block a user