The sun visor in the Tesla Model S is unfortunately only delivered with illuminated make-up mirrors since spring 2018.
User migselv has posted a great tutorial in the german TFF forum on how to replace the sun visors on older Model S. For the very old vintages without autopilot it is even easier, because the cables for the power are already installed. For the newer models since AP1 a power cable has to be installed first.
Link to the detailed instructions.
Check out this other retrofit for Model S: Trunk Shelf Lift