A dedicated setup for the in-beam measurement of absolute cross sections of astrophysically relevant charged-particle induced reactions is presented. These, usually very low, cross sections at energies of astrophysical interest are important to improve the modeling of the nucleosynthesis processes of heavy nuclei. Particular emphasis is put on the production of the $p$ nuclei during the astrophysical $gamma$ process. The recently developed setup utilizes the high-efficiency $gamma$-ray spectrometer HORUS, which is located at the 10 MV FN tandem ion accelerator of the Institute for Nuclear Physics in Cologne. The design of this setup will be presented and results of the recently measured $^{89}$Y(p,$gamma$)$^{90}$Zr reaction will be discussed. The excellent agreement with existing data shows, that the HORUS spectrometer is a powerful tool to determine total and partial cross sections using the in-beam method with high-purity germanium detectors.