fix: move base into teh config
This commit is contained in:
parent
48a23519e9
commit
b15b07ae36
1 changed files with 7 additions and 3 deletions
|
@ -6,7 +6,6 @@ Gonna use a priper nixos module for this
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.services.skynet_ldap;
|
cfg = config.services.skynet_ldap;
|
||||||
base = "dc=skynet,dc=ie";
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
# these are needed for teh program in question
|
# these are needed for teh program in question
|
||||||
|
@ -40,6 +39,11 @@ Gonna use a priper nixos module for this
|
||||||
type = types.port;
|
type = types.port;
|
||||||
default = 8080;
|
default = 8080;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
base = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "dc=skynet,dc=ie";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -110,10 +114,10 @@ Gonna use a priper nixos module for this
|
||||||
olcDatabase = "{1}mdb";
|
olcDatabase = "{1}mdb";
|
||||||
olcDbDirectory = "/var/lib/openldap/data";
|
olcDbDirectory = "/var/lib/openldap/data";
|
||||||
|
|
||||||
olcSuffix = base;
|
olcSuffix = cfg.base;
|
||||||
|
|
||||||
/* your admin account, do not use writeText on a production system */
|
/* your admin account, do not use writeText on a production system */
|
||||||
olcRootDN = "cn=admin,${base}";
|
olcRootDN = "cn=admin,${cfg.base}";
|
||||||
olcRootPW.path = config.age.secrets.ldap_pw.path;
|
olcRootPW.path = config.age.secrets.ldap_pw.path;
|
||||||
|
|
||||||
#olcOverlay = "memberof";
|
#olcOverlay = "memberof";
|
||||||
|
|
Loading…
Reference in a new issue