For P&N physics, I usually buy crew quarters to make up the internal repairs and then use my levelup points for armor repair.
I also make sure to have a few points (0.1 to 0.2 total ability) in hull repair, just in case my repair components take damage.
A repair bay is one of my priorities, and if I can't steal one from the pirates, I'll buy one.
Of course, I'm a cheap penny-pincher, and don't like spending the few bucks it takes to replace damaged armor unless my whole ship is totalled and it would take a few hours of realtime before the self-repair finished.