From b15b07ae363b8a9d372a12c895da39898c569c21 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Sun, 21 May 2023 12:02:52 +0100 Subject: [PATCH] fix: move base into teh config --- applications/ldap.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/applications/ldap.nix b/applications/ldap.nix index 5f8a7f4..6aa5c87 100644 --- a/applications/ldap.nix +++ b/applications/ldap.nix @@ -6,7 +6,6 @@ Gonna use a priper nixos module for this with lib; let cfg = config.services.skynet_ldap; - base = "dc=skynet,dc=ie"; in { # these are needed for teh program in question @@ -40,6 +39,11 @@ Gonna use a priper nixos module for this type = types.port; default = 8080; }; + + base = mkOption { + type = types.str; + default = "dc=skynet,dc=ie"; + }; }; config = mkIf cfg.enable { @@ -110,10 +114,10 @@ Gonna use a priper nixos module for this olcDatabase = "{1}mdb"; olcDbDirectory = "/var/lib/openldap/data"; - olcSuffix = base; + olcSuffix = cfg.base; /* 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; #olcOverlay = "memberof";