diff --git a/modules/common/shell/work.nix b/modules/common/shell/work.nix index 3df7056..87c79c0 100644 --- a/modules/common/shell/work.nix +++ b/modules/common/shell/work.nix @@ -48,11 +48,19 @@ fi ${ldap_script}/bin/ldap "$@" | jq '[ .[].member] | add' ''; + ldapl_script = pkgs.writeShellScriptBin "ldapl" '' + if ! [ "$LDAP_HOST" ]; then + echo "No LDAP_HOST specified!" + exit 1 + fi + ${ldap_script}/bin/ldap "*$@*" | jq -r '.[].name' + ''; in [ ldap_script ldapm_script ldapg_script + ldapl_script jq_parse ]; };