Here they say that a person consists of desires. And as is his desire, so is his will. As is his will, so is his deed. Whatever deed he does, that he will reap. One becomes virtuous by virtous action, bad by bad action.
-Shukla Yajur Veda, Brihadharanyaka Upanishad, 4.4.5