diff --git a/users/Profpatsch/lib.nix b/users/Profpatsch/lib.nix index 9dd3cd481..db81c2dfe 100644 --- a/users/Profpatsch/lib.nix +++ b/users/Profpatsch/lib.nix @@ -22,7 +22,10 @@ let ]; eprintenv = depot.nix.writeExecline "eprintenv" { readNArgs = 1; } [ - "fdmove" "-c" "1" "2" bins.printenv "$1" "$@" + "ifelse" [ "fdmove" "-c" "1" "2" bins.printenv "$1" ] + [ "$@" ] + "if" [ eprintf "eprintenv: could not find \"\${1}\" in the environment\n" ] + "$@" ]; # remove everything but a few selected environment variables