stainless steel sheet metal screws with washers for a larger gripping surface. the screws do not have to be big, just big enough to still hide in the carpet pile.
for the carpet that extends up the firewall, i've used simple double stick tape from Wally World.