When a shallow layer of inviscid fluid flows over a substrate, the fluid particle trajectories are, to leading order in the layer thickness, geodesics on the two-dimensional curved space of the substrate. Since the two-dimensional geodesic equation is a two degree-of-freedom autonomous Hamiltonian system, it can exhibit chaos, depending on the shape of the substrate. We find chaotic behaviour for a range of substrates.