The fundamentals of Lyman-alpha exoplanet transits