Last time I tried this, the drywall screws I was using snagged and started unraveling the carpet.
Is there a particular kind of screw that won't snag carpets? It's a loop/pile carpet so snagging is pretty likely.
Nails unfortunately aren't going to suffice unless they are maybe resistant to being pulled out like a screw would be.
And yeah... I'm putting it into drywall.