Nirriti the Black was one of the Firsts and a Christian. He left the Celestial City because he believed their assumption of the personas of Hindu gods was blasphemy against the one, true Christian god. He fashioned himself the Dark Lord and got himself a zombie army that does his bidding without question—on account of the fact that they are zombies, and zombies don't ask questions by default.
Nirriti is the yin to Sam's yang, the dog to his cat, the apple to his… orange? In more academic terms, he's Sam's foil. That is, he's the character who contrasts Sam's personality by being his opposite while still maintaining similarities. After all, he's the Dark Lord and Sam's the Lord of Light. So yeah—opposites.
See, both Sam and Nirriti seem to want the same thing. They want the world to become a place of equality, free from the tyranny of the so-called gods. Sam finds his philosophy in the outlawed teachings of the Buddha, while Nirriti finds his in outlawed Christian Bible, particularly the Sermon on the Mount. But when Nirriti recites the Sermon on the Mount on his deathbed, Sam says, "I agree with everything you said to Yama, and so do the followers of the one they called the Buddha" (7.485). These are their similarities.
The contrast and opposition comes in their solutions to the problem. Sam wants to see Acceleration and freedom of religion become available to all. For him, equality equals freedom. Nirriti simply wants to replace the totalitarian regime of the gods with a totalitarian regime of the god, singular, though. In other words, the world will remain the same only Nirriti's god—and by extension, Nirriti—will rule. Everyone else will be equal, but they'll be equal in the sense that they'll all be zombies. Maybe it's just us, but that kind of equality kind of defeats the point.
Nirriti is probably named after Nirrti, an Indian goddess of death and destruction who lived in the land of the dead.