  We briefly review the description of the internal sector of supergravity
theories in the language of generalised geometry and how this gives rise to a
description of supersymmetric backgrounds as integrable geometric structures.
We then review recent work, featuring holomorphic Courant algebroids, on the
description of $\mathcal N=1$ heterotic flux vacua. This work studied the
finite deformation problem of the Hull-Strominger system, guided by
consideration of the superpotential functional on the relevant space of
geometries. It rewrote the system in terms of the Maurer-Cartan set of a
particular $L_\infty$-algebra associated to a holomorphic Courant algebroid,
with the superpotential itself becoming an analogue of a holomorphic
Chern-Simons functional.
