  The eta invariant appears regularly in index theorems but is known to be
directly computable from the spectrum only in certain examples of locally
symmetric spaces of compact type. In this work, we derive some general formulas
useful for calculating the eta invariant on closed manifolds. Specifically, we
study the eta invariant on nilmanifolds by decomposing the spin Dirac operator
using Kirillov theory. In particular, for general Heisenberg three-manifolds,
the spectrum of the Dirac operator and the eta invariant are computed in terms
of the metric, lattice, and spin structure data. There are continuous families
of geometrically, spectrally different Heisenberg three-manifolds whose Dirac
operators have constant eta invariant. In the appendix, some needed results of
L. Richardson and C. C. Moore are extended from spaces of functions to spaces
of spinors.
