Local rotation smoothing/interpolation of a rigidbody?

For example if I have a bicycle that can lean on Y axis without constraints, but interpolates along X so to avoid doing constant wheelies, but still the bike will follow the contours of hills, how to achieve this with a rigid body?

Unity’s rigid body only has a checkbox to disable the rotation axis entirely but is not very helpful since the bike would always be level.

Instead of locking the local X rotation, how could I interpolate the local X rotation of a rigid body?

I think the solution was to limit the angularVelocity of the rigid body in local space:

var angularVelocityLocal = transform.InverseTransformDirection(rb.angularVelocity);
angularVelocityLocal.x = angularVelocityLocal.x * 0.1f;
rb.angularVelocity = transform.TransformDirection(angularVelocityLocal);