The treaty of Tripoli is not binding law upon domestic affairs within the United States.
You are correct, but there's a bit more here.
Basically, the First Amendment does two things for religion. First, it insists that the government cannot infringe on anyone's right to worship. Second, the government cannot endorse any religion as a state religion.
The phrase, "separation for church and state" is NOT in the Constitution...but is a policy that Jefferson followed that was based on the logic of the First Amendment as an answer to the letters sent to him by the Danbury Baptists. In essence, the Baptists in Connecticut were a smaller Christian church that were outvoted in the state legislature at every turn. They wrote to Jefferson to ask him to use his office and the power of the government to even it out. Jefferson refused, using the First Amendment as the reason and in his reply used the phrase "separation of church and state". So, while those who would argue that the US is a "Christian nation" and like to point out that the phrase is not in the Constitution, their argument fails when you take into account that the phrase is simply policy based on the First Amendment, therefore, applicable. Speaking about the "Christian nation" idea....
Let's make a couple of facts clear. Most Americans, at the time the Constitution and the Bill of Rights were adopted, practiced one form of Christianity or another. Also, at that time, there were almost no Jews, Hindus, Buddhists, etc. Also, the number of Muslims were also almost non-existing, save for a small group of slaves bought from Northern Africa. Having said that....
While many of the Founders and Framers were Christians, many were also deists. People who believed in a more natural, non-involved greater being. Almost all of the Founders and Framers also had very good education for their times. Their education was steeped in Greco-Roman history, engineering, mathematics, law and philosophy (of all types). Did many of these Founders and Framers attend church? Yes, the did. Did they pray at Congress and before the sessions when hammering out the Bill of Rights and Constitution. More often than not, yes. Doesn't that make the US a "Christian nation"? No, and here's why....
The First Amendment of the Bill of Rights.
If we were to define the US as a "Christian nation" due to the numbers only; then yes, we would be a "Christian nation". But that's not the real definition that is being used today to argue that we are a "Christian nation". The argument is that we are such a nation because out laws are based on Christian morality and ethos. But it isn't. Because if it were, then there would be a religion endorsed by the government and the First Amendment would not exist.
Remember a few things here. First, there was no threat of a non-Christian religion at that time. No Sharia law threats, nothing. So, why did we need to pass an Amendment that both protected the worship but prevented the endorsement of religion by the government? What was the point of that? The answer is simple...
The Founders and Framers feared Christianity would impede on the freedoms of the citizens. And the Danbury letters proved them right.
Christianity has many different sects. And some sects bear great animosity towards others; there was a one year war in the then colony of Maryland between the Protestants and Catholics. The Danbury Baptists were looking to gain power over a larger sect by using governmental power. This is EXACTLY what the Founders and Framers did NOT want! They also remembered how in Britain and as colonies that if you did not belong to the Church of England, a Christian sect, it was legal to discriminate against you.
In other words, the point of the First Amendment, if you want to talk about specific religions and the Constitution and Bill of Rights, was to counter the ability of Christianity, no matter the sect, to influence and control government.