Ibn Abi al-Kharif narrates from his father, who narrates from his grandfather (may Allah be pleased with him), that he said: My brother and I came to the Messenger of Allah (peace and blessings be upon him) while he (peace and blessings be upon him) was leading the prayer in Masjid al-Khayf. We had already prayed our obligatory prayer at home, so we did not pray with them. He (peace and blessings be upon him) said: "What prevented you two from praying with us?" We said: We had already prayed our obligatory prayer at home. So the Messenger of Allah (peace and blessings be upon him) said: "When a man has prayed his obligatory prayer at home and then finds a congregation, let him pray with them as well, and the prayer at his home will count as voluntary (nafl)."
Hadith Referenceالمعجم الكبير للطبراني / مسند من يعرف بالكنى / 19150