Are there habits that make depression more likely?

Negative habits. Yes. Things that may contribute to depression include abuse of alcohol, illicit drugs and prescribed medications. Being exposed to prolonged stress , as well as acute tramau, may lead to depression. Bad habits such as poor diet, lack of exercise and poor sleep hygiene are other contributors. Some meds can cause depression, such as beta blockers and steroids. Underlying illnesses may be causes.
Yes. Though there is a genetic component to depressive illnesses, not taking good care of yourself (the basics---eating well, sleeping well, exercising regularly) and not dealing with stress well as well as having a less than positive outlook all can raise your risk for depression.