  The deformed Hermitian Yang-Mills (dHYM) equation is a special Lagrangian
type condition in complex geometry. It requires the complex analogue of the
Lagrangian phase, defined for Chern connections on holomorphic line bundles
using a background K\"ahler metric, to be constant. In this paper we introduce
and study dHYM equations with variable K\"ahler metric. These are coupled
equations involving both the Lagrangian phase and the radius function, at the
same time. They are obtained by using the extended gauge group to couple the
moment map interpretation of dHYM connections, due to Collins-Yau and mirror to
Thomas' moment map for special Lagrangians, to the Donaldson-Fujiki picture of
scalar curvature as a moment map. As a consequence one expects that solutions
should satisfy a mixture of K-stability and Bridgeland-type stability. In
special limits, or in special cases, we recover the K\"ahler-Yang-Mills system
of \'Alvarez-C\'onsul, Garcia-Fernandez and Garc\'ia-Prada, and the coupled
K\"ahler-Einstein equations of Hultgren-Witt Nystr\"om. After establishing
several general results we focus on the equations and their large/small radius
limits on abelian varieties, with a source term, following ideas of Feng and
Sz\'ekelyhidi.
