Moved the stupid hack somewhere more reasonable

This commit is contained in:
niten 2023-09-06 15:49:34 -07:00
parent f5e5e263ef
commit 83b85a7495
1 changed files with 17 additions and 29 deletions

View File

@ -31,19 +31,7 @@ let
else else
"/home/${user-opts.primary-group}/${username}"; "/home/${user-opts.primary-group}/${username}";
userLdif = base: name: group-map: opts: userLdif = base: name: group-map: opts: ''
let
# TODO: HORRIBLE HACK
domains = {
fudo = "fudo.org";
selby = "selby.ca";
informis = "informis.land";
};
email = if (opts.email != null) then
opts.email
else
"${name}@${domains."${opts.primary-group}"}";
in ''
dn: uid=${name},ou=members,${base} dn: uid=${name},ou=members,${base}
uid: ${name} uid: ${name}
objectClass: account objectClass: account
@ -58,7 +46,7 @@ let
shadowMax: 99999 shadowMax: 99999
shadowWarning: 7 shadowWarning: 7
userPassword: ${opts.ldap-hashed-passwd} userPassword: ${opts.ldap-hashed-passwd}
mail: ${email} mail: ${opts.email}
''; '';
systemUserLdif = base: name: opts: '' systemUserLdif = base: name: opts: ''