  As noted by Witten, compactifying a $d$-dimensional holographic CFT on an
$S^1$ gives a class of $(d-1)$-dimensional confining theories with gravity
duals. The prototypical bulk solution dual to the ground state is a double Wick
rotation of the AdS$_{d+1}$ Schwarzschild black hole known as the AdS soliton.
We generalize such examples by allowing slow variations in the size of the
$S^1$, and thus in the confinement scale. Coefficients governing the second
order response of the system are computed for $3 \le d \le 8$ using a
derivative expansion closely related to the fluid-gravity correspondence. The
primary physical results are that i) gauge-theory flux tubes tend to align
orthogonal to gradients and along the eigenvector of the Hessian with the
lowest eigenvalue, ii) flux tubes aligned orthogonal to gradients are attracted
to gradients for $d \le 6$ but repelled by gradients for $d \ge 7$, iii) flux
tubes are repelled by regions where the second derivative along the tube is
large and positive but are attracted to regions where the eigenvalues of the
Hessian are large and positive in directions orthogonal to the tube, and iv)
for $d > 3$, inhomogeneities act to raise the total energy of the confining
vacuum above its zeroth order value.
