Favorable optoelectronic properties and ease of fabrication make NiO a promising hole transport layer for perovskite solar cells. To achieve maximum efficiency, the electronic levels of NiO need to be optimally aligned with those of the perovskite absorber. Applying surface modifiers by adsorbing species on the NiO surface is one of the most widespread strategies to tune its energy levels. Alkali halides are simple inorganic surface modifiers that have been used extensively in organic optoelectronics, but rarely studied in perovskite solar cells. Using density functional theory calculations, we investigate the effect of single-layer adsorption of 20 different alkali halides on the electronic levels of NiO. Our results show that alkali halides can shift the position of the valence-band maximum (VBM) of NiO to a surprisingly large extent in both directions, from -3.10 to +1.59eV. We interpret the direction and magnitude of the shift in terms of the surface dipoles, formed by the adsorbed cations and anions, where the magnitude of the VBM shift is a monotonic function of the surface coverage. Our results indicate that with alkali halide surface modifiers, the electronic levels of NiO can be tuned robustly and potentially match those of many perovskite compositions in perovskite solar cells.