The reports previously issued predominantly paid attention to the d-block magnetic elements δ-doped digital magnetic materials. In this work, GaN δ-doped with non-magnetic main group s-block elements K and Ca as digital magnetic heterostructures were purposed and explored theoretically. We found that K- and Ca-embedded GaN digital alloys exhibit spin-gapless and half-metallic ferromagnetic characteristics, respectively. All compounds obey the Slater–Pauling rule with diverse electronic and magnetic properties. For these digital ferromagnetic heterostructures, spin polarization occurs in nitrogen within a confined space around the δ-doped layer, demonstrating a hole-mediated two-dimensional magnetic phenomenon.