Sydney's New Year's Eve fireworks will go ahead as planned after an 11th-hour deal between the NSW government and combined rail unions.