Ink formulation based on (semi)conducting nanoparticles