Bathroom fan duct connection for maintainability
I'd think about stopping the rigid duct about two feet from the fan and connecting a piece of aluminum flex duct to the end of the rigid and on to the fan. You'd have some flexibility in removing the fan in the future.  If you're hell bent on rigid all the way, replace the old fan now with a new one, vent it up solid with your rigid and buy an exact additional fan for the future replacement of parts without having to replace the housing and messing with the rigid connection..