From 043cd8ce5c86eea71fb20b8adb7e198f9dddf8c9 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Mon, 27 Jan 2025 10:26:01 -0500 Subject: [PATCH] add ldapl script --- modules/common/shell/work.nix | 8 ++++++++ 1 file changed, 8 insertions(+) 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 ]; };