The physical properties of high-T c superconductors are affected by spatial inhomogeneities introduced by impurities. In addition, superconductivity and electronic nematicity seem intertwined in these materials. To address these questions, we apply inhomogeneous cluster dynamical mean field theory to the study of superconductivity in the Hubbard model, in the presence of a repeated impurity, at zero temperature. We find that the superconducting phase is shifted slightly away from half-filling due to the presence of the impurity. This can be explained by a competition with the Mott insulating phase which then persists at finite doping. In addition, the impurity triggers the appearance of spontaneous nematicity. The nematic order parameter follows a dome shape as a function of doping, similar to that of the superconducting order parameter, and increases with impurity potential.