The equipment will have temperature ratings as part of the specs and I know from experience that stuff runs well outside those ranges. I had a bunch of stuff running in a dusty, non-airconditioned and sporadically heated place where temps ranged from 0-45. One of the computers would overheat sometimes, but that was usually a sign to blow the dust out of it. Nothing else used to shut down.
Realistically, I think it will shorten the life of your gear but it probably depends how hot it gets in your roof space. Start measuring it perhaps. If it gets over 50, which it can easily do where I am, I think your stuff will die pretty fast.
Don’t you have a cupboard or pantry or something you can use? That’s what I do now.