Nanomaterials and devices for water and air