Assembling X-ray sources by carbon nanotubes