You need your Bankruptcy Chapter 7 to be discharged first before getting a loan to buy a house. Most lenders require two to four years of re-established credit before they will consider making you a loan. However, many lending sources are competing today to make loans to borrowers with less-than-perfect credit even if you have had your Chpter 7 discharged less than two years ago. You may need to put down a sizable down payment,and have sufficient income to qualify howevevr.
there are some mortgage lenders that will allow one day out of bankruptcy with 100% financing