You can clap your hands loudly and tell him 'no'. You can stomp your foot and turn your back on him, pointedly looking over your shoulder at him then looking away again(bunny language for 'you've ticked me off'). Or you can gently but firmly press his head down for a few seconds, like a dominant or mother rabbit does to discipline other rabbits. Sometimes a timeout will work as well. Something else you could try is giving him something yummy immediately after you stop petting, to distract him from the behavior. Just make sure you only give the treat if he is behaving well. You want to catch him before he starts the bad behavior, to interrupt the cycle of lunging and nipping.
You may have to try several different methods til you hit on the one that works for him.