Carbon materials are excellent candidates for photovoltaic solar cells: they are Earth-abundant, possess high optical absorption and carrier mobility, and superior thermal and photostability. Here we report on solar cells with active layers made solely of carbon nanomaterials, that present the same advantages of conjugated polymer-based solar cells - namely solution processable, potentially flexible, and chemically tunable - but with significantly increased photostability and the possibility to revert photodegradation. The device active layer composition is optimized using ab-initio density functional theory calculations to predict type-II band alignment. The best device fabricated achieves a power conversion efficiency of 1.3%, seven times larger than previous solar cells based on carbon as the active material. Such efficiency is comparable to that achieved by polymer-based solar cells just a few years ago, but with great potential for improvement considering that this is the first efficient device of this kind. Our results indicate a new strategy for efficient carbon-based, solution-processable, thin film, photostable solar cells.