This is a well-known verse, a real highlight for Joshua and God's people. It shows us how to lead our families and churches and nations, with the personal example of piety and declaring what our house will do.
The conversation that follows is interesting, though, and should be considered before we start making strong statements about how things are going to be in OUR house.
Israel first agrees. Yes, we will serve the Lord, too (Joshua 24:16-18).
Joshua's reply is startling: "You can't. God is jealous and won't forgive your sins if you forsake Him (19-20). Why would he say this? The answer is found in vs 23. After more back and forth with the people insisting, "No, really, we WILL serve Yahweh," Joshua says, "Then put away the foreign gods that are among you!"
Realize that when you decide to follow Jesus, when you decide to lead your family to Jesus in His Word and prayer more often, realize that there are forces already present and at work in you and your family working against that, that you will have to fight and resist. Foreign gods are present among God's people, even at the most glorious periods of our history.
Revival comes not just when we decide to fight them, or make statements against them, or pray against them together at city hall, but when we consistently, persistently put the idols away and don't go back to them.