If you file bankruptcy, you can apply for an FHA home loan in 1-2 years from the date of your discharge.  With other forms of financing, it might take 3-4 years.