The book Project Hail Mary by Andy Weir this is exactly what they do - have a layer of the bacteria (which is integral to the plot) between the hull and where the humans lived.
In the Expanse books, space colonies would consume algae. Using some alien woo-woo, they engineered one with a superior yield because it could supplement its inputs with radiation.
In the short lived HBO comedy Avenue 5 the ship was surrounded by a “poop shield” that used human excrement as a radiation shield. Someone forgot to vent the system and it burst, sending feces flying in a small orbit around the ship.
Later on, one of the characters sees the face of Pope John Paul II in the poop and the owner of the spaceship (who was supposed to be played by Jack Black but instead Josh Gad ruined the entire series) sends up a laser light show to illuminate the dookies in space.