  We prove a geodesic distance formula for quasi-psh functions with finite
entropy, extending results by Chen and Darvas. We work with big and nef
cohomology classes: a key result we establish is the convexity of the
$K$-energy in this general setting. We then study Monge-Amp\`ere measures on
contact sets, generalizing a recent result by the first author and Trapani.
