The electrical resistivity, Hall effect, and magnetoresistance of Mg2NiHx (0<x<4) films are investigated as a function of temperature, between 2 K and 280 K and magnetic fields up to 7 T. The overall features exhibited by the electrical resistivity rho and the charge-carrier density n at 4.2 K in Mg2NiH4-delta are those of a heavily doped semiconductor. As a function of x, accompanied by an increase of rho, n decreases linearly. This is consistent with an "anionic" model for H in the host lattice: each added H atom removes one electron from the conduction band, resulting in an increased resistivity. Over the entire concentration range (for 0<x<4), we find approximately that rho(T)similar or equal torho(0)-rho(1)ln T+rho(2)T(1.85). The amplitude rho(1) of the Kondo term and rho(2) of the electron-electron scattering term vary by more than two orders of magnitude and exhibit power-law dependence as a function of n. The experimental data can be understood within an effective medium theory, where Mg2NiHx samples disproportionate into metallic Mg2NiH0.3 and semiconducting Mg2NiH4-delta. In this picture, we show that the relatively low rho (<4mOmega cm) measured in samples with xless than or similar to3.5 is due to the peculiar geometry of the metallic inclusions (very flat oblate spheroids). The relation with the highly absorbing black state in Mg2NiH0.7 is discussed.