  We generalize the curved $N$-body problem to spheres and hyperbolic spheres
whose curvature $\kappa$ varies in time. Unlike in the particular case when the
curvature is constant, the equations of motion are non-autonomous. We first
briefly consider the analogue of the Kepler problem and then investigate the
homographic orbits for any number of bodies, proving the existence of several
such classes of solutions on spheres. Allowing the curvature to vary in time
offers some insight into the effect of an expanding universe, in the context
the curved $N$-body problem, when $\kappa$ satisfies Hubble's law. The study of
these equations also opens the possibility of finding new connections between
classical mechanics and general relativity.
