Have to say, from an experience cleaning my Grandma's old house that had been smoked in for ~25 years, that TSP (Trisodium Phosphate) will clean the walls and do a wonderful job removing the smell. You've already cleaned the carpets, and like many have suggested, it would probably be best to clean them once again right after cleaning the walls.
I'm not sure how it reacts with paint, so a post detailing what kind of paint it is, if you know, would help immensely. I believe the paint I cleaned was latex, however don't hold me accountable on that. As an added note, try the sales associates located at your favorite home improvement joint (Lowes, Home Depot, the same place you buy the TSP at, if you do.) They're bound to have some advice.