Judge approves settlement agreement between N.S. government