I would first & foremost work on teaching the horse 'good manners'. Train the behaviours you *want* and particularly 'manners' which are conflicting to 'rudeness' - eg. If you teach him to put his head down & take a step back, well he'll find it difficult to do that & push/nip
I use 'clicker training' *principles* a lot in my training. The very basic principle of effective training is to make sure the behaviour you want 'works' for the horse - is reinforced - and the behaviour you don't want NEVER EVER works for them. So for eg. If you're using food treats as a reward & the horse does something deserving, but goes to take the treat with his ears back & teeth bared, REALISE YOU WILL BE REWARDING/REINFORCING THAT, so DON'T DO IT!
But especially if this 'bad' behaviour has worked for him before, the horse will perservere, may try harder at the behaviour that's worked in the past and you'll no doubt have to use punishment as well. Horses learn by *instant* association, so punishment needs to happen *at the time of* the 'offence'. 2 seconds after the behaviour is too late. That goes for reinforcing 'good' behaviour too BTW. The best way of using punishment IMO is to set it up so the horse effectively punishes *himself*.
Eg; Carry a wire brush or hoof pick in such a way that if the horse pushes/leans on you *he runs into the sharp pressure*. Wave your elbow or hand sporadically(not directly at the horse) when leading, so the horse learns to stay at arm's reach to avoid getting himself in the way of a swing. If walking in front of a horse that crowds you, randomly changing into an energetic reverse & make like you're going to run over them if they don't move(pretend there's a snake just reared up in front of you!) will teach them not only not to crowd, but 'listen' closely to your bodylanguage to know when/where to move. With nipping, again, holding a wire brush, or pinching their lip when they attempt to.