  We performed density functional theory calculations on heterostructures of
single layers of hexagonal BN and MoS$_2$ to assess the effect of doping in the
BN sheet and of interstitial Na atoms on the electronic properties of the
adjacent MoS$_2$ layer. Our calculations predict that $n$-doping of the boron
nitride subsystem by oxygen, carbon and sulfur impurities causes noticeable
charge transfer into the conduction band of the MoS$_2$ sheet, while $p$-doping
by beryllium and carbon leaves the molybdenum disulphide layer largely
unaffected. Intercalated sodium atoms lead to a significant increase of the
interlayer distance in the heterostructure and to a metallic ground state of
the MoS$_2$ subsystem. The presence of such $n$-dopants leads to a distinct
change of valence band and conduction band offsets, suggesting that doped BN
remains a suitable substrate and gate material for applications of $n$-type
MoS$_2$.
