How to end up in-house?

I would really like to end up as an in-house lawyer at a tech firm, does it matter where and in to what area I qualify?

If I want to end up as an in-house lawyer what is the best area of law to qualify into? Litigation? General Commercial? Something else? Or doesn’t it matter? While I would have thought that if I qualify into IP I would stand the best chance of getting into a tech firm does that sound too narrow? And does it matter where I qualify?