From beag (“little”) + nach (“that not”), a construction that existed already in Old Irish bec nach.
beagnach