From sunlight to farm waste, small cities create energy from what's on hand