You're thinking of a triggered effect. If Nexus if Fate said "When this card is put into your graveyard from anywhere, shuffle it into your library" (just like how it is with
Ulamog, the Infinite Gyre) then you would be correct.
Rest in Peace would
exile it, so the effect would never trigger. Instead, Nexus of Fate is also a replacement effect, so the controller gets to choose where it goes.
The same is true if you have a
Wheel of Sun and Moon with a
Rest in Peace out. You can choose to send the cards to
exile, or bottom of library.