We use the 2dF Galaxy Redshift Survey to measure the dependence of the bJ-band galaxy luminosity function on large-scale environment, defined by density contrast in spheres of radius 8h-1Mpc, and on spectral type, determined from principal component analysis. We find that the galaxy populations at both extremes of density differ significantly from that at the mean density. The population in voids is dominated by late types and shows, relative to the mean, a deficit of galaxies that becomes increasingly pronounced at magnitudes brighter than M_bJ-5logh