2017 nissan titan xd has no plugs in headlinerHave you pulled the unit out of the truck yet? If not, there are two plastic caps in the headliner just above the opening portion of the rear window. Pop those out and using an 8mm deep socket and extension on your ratchet you can reach the nuts holding the light unit into the truck roof.
From there you are on your own as I've not done more than loosen the light to allow access of the antenna wire for my XM radio.
Hope this helps.