I would have thought almost 2 hours should be enough time
but of course there could be delays at immigration and your flight could be delayed
the bus takes around 25-30 minutes to get to Edinburgh Waverley slightly less to haymarket
I would certainly recommend East coast over scotrail