We investigate the influence of the initial overdensities and masses of proto-galaxies on their subsequent evolution (the star formation history in particular) to understand whether these key parameters are sufficient to account for the varied properties of the galactic populations. By means of fully hydrodynamical N-body simulations performed with the code EvoL, we produce 12 self-similar models of early-type galaxies of different initial masses and overdensities, and follow their evolution from the early epochs (detachment from the linear regime and Hubble flow at z ≥ 20) down to the stage when mass assembly is complete, i.e. z ≤ 1 (in some cases the models are calculated up to z = 0). The simulations include radiative cooling, star formation, stellar energy feedback, re-ionizing photo-heating background and chemical enrichment of the interstellar medium; we do not consider the possible presence of active nuclei. We find a strong correlation between the initial properties of the proto-haloes and their subsequent star formation histories. Massive (Mtot ≃ 1013 M⊙) haloes experience a single, intense burst of star formation (with rates ≥103 M⊙ yr−1) at early epochs, consistently with observations, with less pronounced dependence on the initial overdensity; intermediate-mass (Mtot ≃ 1011 M⊙) haloes have histories that strongly depend on their initial overdensity, whereas low-mass haloes (Mtot ≃ 109 M⊙) always have erratic, bursting like star-forming histories, due to the ‘galactic breathing’ phenomenon. The model galaxies have morphological, structural and chemical properties resembling those of real galaxies, even though some disagreement still occurs, likely a consequence of some numerical choices. We conclude that total mass and initial overdensity drive the star formation histories of early-type galaxies. The model galaxies belong to the so-called quasi-monolithic (or early hierarchical) scenario in the sense that the aggregation of lumps of dark and baryonic matter is completed very early on in their history. In this picture, nature seems to play the dominant role, whereas nurture has a secondary importance.