Another way to look at it: you use "kein" with nouns, and "nicht" with verbs.