Skip to content

Commit

Permalink
openldap: add -h urlList in service so LDAP TLS could be enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
womfoo committed Jun 14, 2016
1 parent fbde3a7 commit f799308
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions nixos/modules/services/databases/openldap.nix
Expand Up @@ -40,6 +40,13 @@ in
description = "Group account under which slapd runs.";
};

urlList = mkOption {
type = types.listOf types.string;
default = [ "ldap:///" ];
description = "URL list slapd should listen on.";
example = [ "ldaps:///" ];
};

dataDir = mkOption {
type = types.string;
default = "/var/db/openldap";
Expand All @@ -50,7 +57,7 @@ in
type = types.lines;
default = "";
description = "
sldapd.conf configuration
slapd.conf configuration
";
example = ''
include ''${pkgs.openldap}/etc/openldap/schema/core.schema
Expand Down Expand Up @@ -87,7 +94,7 @@ in
mkdir -p ${cfg.dataDir}
chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}
'';
serviceConfig.ExecStart = "${openldap.out}/libexec/slapd -u ${cfg.user} -g ${cfg.group} -d 0 -f ${configFile}";
serviceConfig.ExecStart = "${openldap.out}/libexec/slapd -u ${cfg.user} -g ${cfg.group} -d 0 -h \"${concatStringsSep " " cfg.urlList}\" -f ${configFile}";
};

users.extraUsers.openldap =
Expand Down

0 comments on commit f799308

Please sign in to comment.