The only sure way is painting your shed with creosote!, especially all the perches, and where they connect to the walls. Also painted the floors, doors too. use plastic boxes for nest boxes. We use a mix of straw and hay for nesting material, no real problem with either.
The reason why people say not to use hay is, as it might get mouldy from being damp the mould spores could cause some nasty infections in hens I think. But we have not had the problem, I often use the hay the goats drop from their rack.