The type of fungus that infects toe nails does like to live in dark, cool, moist environments. These environments definitely include places like the bathroom! In fact, probably most cases of toe nail fungal infections are picked up in gymnasiums, shower stalls, and the like.
There are a few different things you can do to try to prevent this from happening. One is that you can make sure that your shower stall is very clean, regularly scrubbing it out with a strong disinfectant product. The other thing that can help is wearing "shower shoes" to protect your feet while in the shower. It also goes without saying that you shouldn't share any towels, socks, shoes, or other similar personal articles with your roommate.
In the meantime, if you are concerned that you may be picking up a fungal infection, please talk to your primary care doctor
. Symptoms of a fungal infection of the foot include itching and redness and peeling of the skin on the bottom of the foot, as well as thickening and distortion of the nails. If you have any of these symptoms, go to see your primary care doctor right away.