It's a combination of many things in my opinion. I don't believe It's fully 100% DNA as all identical twins would have the same sexuality, which is not the case.
The most credible information I've seen indicates that it is fixed either before birth or early in life. That doesn't answer your question, but it seems clear there's some sort of non-environmental factor (hormones in the mother's womb, genetic, or epigenetic) that influences sexual orientation. As far as I know there's no definitive answer on whether it is genetic, epigenetic, something else, or a combination of factors, but the combination seems to be the most plausible possibility.