Nantua is a commune .
Nantua is a commune and subprefecture in the Ain department in eastern France .