We derive an exact formula for the scaled cumulant generating function of the time-integrated current associated to an arbitrary ballistically transported conserved charge. Our results rely on the Euler-scale description of interacting, many-body, integrable models out of equilibrium given by the generalized hydrodynamics, and on the large deviation theory. Crucially, our findings extend previous studies by accounting for inhomogeneous and dynamical initial states in interacting systems. We present exact expressions for the first three cumulants of the time-integrated current. Considering the non-interacting limit of our general expression for the scaled cumulant generating function, we further show that for the partitioning protocol initial state our result coincides with previous results of the literature. Given the universality of the generalized hydrodynamics, the expression obtained for the scaled cumulant generating function is applicable to any interacting integrable model obeying the hydrodynamic equations, both classical and quantum.