Here is some information I found. About 2/3 of the way down the page it talks about the cannon installation.
Aerospaceweb.org | Ask Us - F-35 JSF Weapon Carriage Capacity
The Air Force F-35A has a refueling-boom socket behind the cockpit, while the F-35B and F-35C have a retractable refueling probe on the right side of the nose.
Only the USAF F-35A has a built-in gun, with an "Advanced 27 Millimeter Cannon", an improved version of the Mauser BK-27 revolver-type cannon, in the left wingroot. The other variants do not have a built-in gun, but can accommodate a cannon pack plugged into one of the weapons bays.