Advice on bulk buying nuts
Some of the main concerns with storage and consumption of raw nuts are (in no particular order)


The presence of Salmonella
The oil in the nuts becomes rancid
The presence of insects


According to a food safety pamphlet put out by UC Davis, 


  Because of their association with two raw almond outbreaks, California almonds sold in retail stores must be treated in some way to eliminate Salmonella. Commercial blanching and roasting processes are examples. Almonds that are not roasted or blanched may be treated with a lighter steam or heat treatment or may be treated with the gas propylene oxide or other approved process. 
  
  http://ucfoodsafety.ucdavis.edu/files/44384.pdf


They also note that dry foods like nuts are not a common source of harmful bacteria. I'm not sure of how much of a concern this should be. Further research may be required. Also note that "Refrigeration and freezing do not destroy this bacteria. The presence of harmful bacteria cannot be determined by sight, smell, taste, or texture."

The oil in nuts tends to start to go off after a few months at room temperature. This won't make the nuts dangerous to eat, but they won't taste good. Things like temperature and humidity will affect the speed at which the nuts go off. Unshelled nuts will last longer at room temperature (and in general) than shelled nuts.

Nuts in the refrigerator should be good for up to one year.  In the freezer, for two years.

The other benefit of freezing nuts is that it will kill insects and their eggs.


  If you want to store nuts obtained from a backyard orchard at room temperature, you will need to first freeze the nuts at 0°F (-18°C) for 48 hours to kill insect pests and their eggs and prevent them from destroying your harvest. Freezing the nuts is not necessary if you intend to store the nuts in the refrigerator. You can also use dry ice ( frozen carbon dioxide) to destroy insect pests prior to storage.
  
  http://ucfoodsafety.ucdavis.edu/files/44384.pdf


It's possible that the farmers will have treated the nuts with one of these methods before selling them. Ideally, you'd be able to find this out from the farmer. Laws in your area may demand such procedures anyway.