The Albanese government has secured a historic deal with the Greens to pass major reforms to national environment laws.