This is a remarkable statement, and is presented so casually as to belie its revolutionary position. Nephi asserts that the covenant is based upon righteousness and not tribal/racial affiliation. In the Old World, this assertion is not made explicit until Paul in New Testament times, and it was considered revolutionary at that point. Yet we have in Nephi the very clear assertion that the ultimate covenant follows something other than the lineage of the chosen people.
This is an extremely unusual position for someone who is one of the historically “chosen” people. When Jacob is expounding on the covenant people, he appears to use the term as it relates to the historical covenant:
2 Ne. 6:11
11 Wherefore, after they are driven to and fro, for thus saith the angel, many shall be afflicted in the flesh, and shall not be suffered to perish, because of the prayers of the faithful; they shall be scattered, and smitten, and hated; nevertheless, the Lord will be merciful unto them, that when they shall come to the knowledge of their Redeemer, they shall be gathered together again to the lands of their inheritance.
2 Ne. 6:12
12 And blessed are the Gentiles, they of whom the prophet has written; for behold, if it so be that they shall repent and fight not against Zion, and do not unite themselves to that great and abominable church, they shall be saved; for the Lord God will fulfil his covenants which he has made unto his children; and for this cause the prophet has written these things.
2 Ne. 6:13
13 Wherefore, they that fight against Zion and the covenant people of the Lord shall lick up the dust of their feet; and the people of the Lord shall not be ashamed. For the people of the Lord are they who wait for him; for they still wait for the coming of the Messiah.
There is a possible reading that the uniting of the gentiles to Zion makes them part of the covenant people in Jacob’s discourse, but the simpler reading is that the promises to the covenant people will result in the gentiles joining with them. In any case, this is certainly not Nephi’s covenant of righteousness, but perhaps at most a covenant of adoption.
This covenant of righteousness is similarly not the context of another recent reference by Nephi to the covenant people:
2 Nephi 29:4
4 But thus saith the Lord God: O fools, they shall have a Bible; and it shall proceed forth from the Jews, mine ancient covenant people. And what thank they the Jews for the Bible which they receive from them? Yea, what do the Gentiles mean? Do they remember the travails, and the labors, and the pains of the Jews, and their diligence unto me, in bringing forth salvation unto the Gentiles?
2 Nephi 29:5
5 O ye Gentiles, have ye remembered the Jews, mine ancient covenant people? Nay; but ye have cursed them, and have hated them, and have not sought to recover them. But behold, I will return all these things upon your own heads; for I the Lord have not forgotten my people.
Here Nephi clearly uses the “covenant people” as a tribal/racial designator, and uses it in apposition to the gentiles.
With all of that background of usage, we have 2 Nephi 30:2. Of course there is a shift in the time context of the designations, with the “ancient covenant people” being the Jews, this covenant of righteousness being a future state. Nevertheless, the theology is monumentally important for the nature of the gospel. In the Old World, the Pauline implementation of the covenant of righteousness is what allows the Gentiles to receive the gospel. Perhaps it is in that prophetic mode that Nephi sees and understands this fundamental theological shift in the relationship between God and his people.
Regardless of how radically Nephi might have understood this process, it is possible that the presence of this understanding in Nephi’s writings is also a result of his efforts to incorporate the gentile populations into the Nephite core society as I have suggested multiple times. The need for the theological understanding of the covenant of righteousness would have had the same importance to Nephi has it did to Paul, enabling the integration of Gentiles into the community of the historical covenant people.
In that social context, it would not be surprising that the Lord would reveal this principle to Nephi - even though the need for that principle is centuries away in the Old World.