The way I always pictured it:
Geek: someone very passionate about a specific technical subject, like gaming or computers, electronics etc
Nerd: basically the same as geek, but more over the top, and perhaps more socially awkward. Richard in Silicon Valley is probably a good example of this. (which reminds me I think I'm behind 1-2 episodes I have to check)
Though I think it's kind of like hipster, there's not really a true definition. I actually sometimes call myself a nerd if the context is right, like if someone makes a really obscure reference and I actually get it. "wow I'm such a nerd, I got that".