At an intro chem level, the oxidation state of all elements in an alloy or intermetallic is zero.
At a deeper level of analysis, fractional, integer, and/or decimal oxidation states may be more appropriate, depending on the system in question.
Per Wikipedia:
An intermetallic, also called an intermetallic compound, intermetallic alloy, ordered intermetallic alloy, and a long-range-ordered alloy, is a solid-state compound exhibiting metallic bonding, defined stoichiometry and ordered crystal structure. Many intermetallic compounds are often simply called alloys.
However (emphasis added):
Schulze in 1967, defined intermetallic compounds as solid phases containing two or more metallic elements, with optionally one or more non-metallic elements, whose crystal structure differs from that of the other constituents.
So, in a high-level description, an intermetallic containing hydrogen such as the $\ce{LaNi5H}$ of the question can be considered essentially to be an alloy with hydrogen as a constituent. Based on this, assigning a $0$ oxidation state to all elements is warranted as a first approximation:
For intermetallic compounds, the ultimate choice of the oxidation state zero at all atoms is best if needed in redox chemistry. (source | doi)
A more detailed investigation might turn up evidence supporting assignment of nonzero fractional, integer, and/or decimal oxidation states to various atoms:
Subtler estimates and round offs are required for compounds with electrons delocalized over non-equivalent atoms, as expressed by several resonance formulas with weights in arbitrarily long decimal numbers. Without round offs of bond orders in Lewis formulas, decimal values of oxidation states would be obtained for certain bonding connectivities. [...] [U]nambiguous and reasonable fractions of small integers are obtained for oxidation states in compounds such as dithiolate and catecholate (see Section 11) or in (car)boranes such as $\ce{B6H10}$ (see Section 6) and $\ce{B10C2H12}$ (p1041), or when vicinal oxidation states are indistinguishably mixed, such as in $\ce{YBaFe2O5}$ (p1058). Reasonable fractional oxidation states appear also in ions where the charge is distributed over several equivalent atoms such as $\ce{C7H7+}$, $\ce{B6H6^2−}$ (p1040), $\ce{I3−}$, and $\ce{N3−}$ (p1037). (source | doi)