Interfacing solid-state emitters with photonic structures is a key strategy for developing highly efficient photonic quantum technologies. Such structures are often organized into two distinct categories: nanocavities and waveguides. However, any realistic nanocavity structure simultaneously has characteristics of both a cavity and waveguide, which is particularly pronounced when the cavity is constructed using low-reflectivity mirrors in a waveguide structure with good transverse light confinement. In this regime, standard cavity quantum optics theory breaks down, as the waveguide character of the underlying dielectric is only weakly suppressed by the cavity mirrors. By consistently treating the photonic density of states of the structure, we provide a microscopic description of an emitter including the effects of phonon scattering over the full transition range from waveguide to cavity. This generalized theory lets us identify an optimal regime of operation for single-photon sources in optical nanostructures, where cavity and waveguide effects are concurrently exploited.