HSA contributions after layoff

Hi, 

 

Context: My HSA was connected to my employer, so I was making pre-tax contributions on every paycheck to reduce my taxable income. I got laid off, so my HSA is no longer connected to my employer.

 

Question: If I have outside income (example: rental income) that hasn't been taxed yet, and I use that income to make personal contributions to my HSA, and then use that HSA contribution to pay for a qualified medical bill, will I still get taxed on that withdrawal? Do I still get the pre-tax benefits? How do I record HSA contributions from outside income on my tax return?