A deal to deport former immigration detainees to Nauru has secured bipartisan support but drawn condemnation from human rights groups.