Moved the stupid hack somewhere more reasonable
This commit is contained in:
parent
f5e5e263ef
commit
83b85a7495
|
@ -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: ''
|
||||||
|
|
Loading…
Reference in New Issue