One of the main ingredients of a good laugh is the unexpected. In that sense I claim that laugher has always some nerd part in it, in a very strict sense. Think about the best joke you can remember, the punchline is always a good plot twist or some bizarre unexpected thing in the sentence. That is probably why being more knowledgeable seems to be correlated with some unhappiness. It’s not that a nerd is not able to laugh, it’s just that it becomes by the time more difficult to find new unexpected things.
As for me, I live for the next good laugh, which sometimes means that I always end up looking up for some too nerdy stuff. If the thing I am reading ends up being too serious I can always go find someone with a totally different background and try to learn from him/her. There is always something to share and to laugh about.
So there are no nerd jokes. In essence, all jokes are nerdy in some sense or another.