or just build it on the earth facing side of the moon , then you have the entire thickness of the moon shielding you. But I believe some of the more interesting use cases for lunar bases require the far side, notably telescopes
Edit: this is incorrect, see below