To, well, both.
Some individuals demonstrate rock-solid homosexual activity under even the most punative of environments. Where there are strong incentives against engaging in homosexual behavior, we can be sure that the behavior itself is unlikely to be motivated by exogenous factors. Ergo, there likely is a genetic precondition that does indeed steer towards homosexual attraction. But genetics are not the end of the story, either, for we can see that homosexual expression alters as a portion of the populace dependent upon allowance or encouragement (when incentives are neutral or encouraging), indicating that exogenous factors can have an effect on marginal cases, which appears to include a not-insignificant portion of the homo and bi sexual population.
People are born with a range of sexual possibilities. Within that range, our experiences and our choices do indeed shape where we will end up.