I will walk with integrity of heart within my house; I will not set before my eyes anything that is worthless. I hate the work of those who fall away; it shall not cling to me.
This entire psalm is a vow of integrity that David made before the Lord. Some of it is unique to his role as Israel's king. Other parts are the kinds of things the covenant of the Law demanded. But the personalization of David's obedience in this matter is still quite instructive. Holiness means something when we own it and apply it to our own circumstances.
Part of our call to holiness should compel us to commit to personal holiness. We have to stay at the task of letting God change us. We must purpose to be true to Him. Our efforts do not save us, but they do keep us safe.
For David, integrity started in his own house. He vowed to not even look at worthless idols. He would not let idolatrous desires cling to him. He knew that God was deserted first at that long, lusting look. And integrity crumbles when worldly longings cling to our hearts. Integrity starts in the purposes of the heart.