At 40 miles, an external antenna is always going to be preferable for best reception. An unimpeded signal gives you the best shot at consistent reception.
However, there can be some challenges with an external installation. Besides having to put the antennal on the roof and anchor it securely, you may have to contend with an ignorant HOA board telling you that external antennas are not allowed. Federal law is on your side. The FCC Over-the-Air Reception Devices rule (OTARD)
, put in place as part of the Telecommunications Act of 1996, preempts restrictions that HOAs and similar organizations can put on the use of external antennas. Note that the law doesn't prevent them from having any restrictions; it just prevents unreasonable ones. An HOA might be able to limit how high your antenna is (especially if it could land in a common area or other homeowner's property if it fell) or they could make you paint it to blend in with surroundings - I don't believe that paint impedes reception enough to be noticeable, if at all. If the HOA does push back, then you have to decide how much you wish to fight them.
There's also the issue of weather, and I'm sure you're well aware that it can get rough in north Texas at times. Wind may knock your antenna out of alignment, hail may damage the elements, plus other issues can mess with the connections. Make sure any external antenna is properly grounded, as a nearby lightning strike could fry your whole setup.
As you can see, an attic installation is probably going to be simpler - much less to worry about. But your trade-off is going to be lesser quality reception. Only you can decide what's right.