A variational model for epitaxially-strained thin films on rigid substrates is derived both by Γ-convergence from a transition-layer setting, and by relaxation from a sharp-interface description available in the literature for regular configurations. The model is characterized by a configurational energy that accounts for both the competing mechanisms responsible for the film shape. On the one hand, the lattice mismatch between the film and the substrate generate large stresses, and corrugations may be present because film atoms move to release the elastic energy. On the other hand, flatter profiles may be preferable to minimize the surface energy. Some first regularity results are presented for energetically-optimal film profiles.