command_not_found_handler() { if type nix-locate > /dev/null; then echo "Command not found, but found in the following packages:" nix-locate -w1 -- "$1" else echo "Command not found, and nix-locate not available" fi }