If you expose for the sun you're going to really struggle to get any detail in the foreground ime, even with something like my D750 which has superb shadow recovery.The other alternative is to expose for the brightest area (maybe give it +1/3 EV), then either bring out the dark sky details with a RAW processor, or in Photoshop using the shadows slider.
If you expose for the sun you're going to really struggle to get any detail in the foreground ime, even with something like my D750 which has superb shadow recovery.