This probably isn't the answer you're looking for, but I don't think this is something you want to do without the help of a lawyer. If it were me, I would find information online (and look at templates), but ultimately I would consult a lawyer before signing and finalizing anything.
Even if you both agree now, things could change in the future and you might end up losing a lot of money. I think paying a lawyer to look over your agreement will protect both of you. Maybe you can split the cost.
There's a couple of lawyers on this site, maybe they have some advice/suggestions.
"I'll let him do whatever he wants with the IP we've built." sounds very dangerous assuming you are buying him out because you too intend to move forward with the same or related IP. And frankly that sounds naive to me.
Write up a letter of intent that outlines what you and your co-founder have agreed to, and include that you agree to work out a formal legal agreement, have him sign that. Meanwhile get a lawyer to work this out.
I had a friend in a similar position. In his situation, he wasn't concerned that the other founder had rights to the IP because he knew that the partner wouldn't execute anyway and he was developing the IP a lot himself. After all, a good startup is all about execution.
However, I think that putting in the proviso that the IP couldn't be on-sold would be wise.