A nut is a piece of hard material placed at the top of the fretboard area, where the neck joins the headstock. On traditional guitars, the nut serves two purposes: to hold the strings in the correct position, and to hold them at the correct height (which determines the action of the instrument).
The placement of the nut and the bridge determine the scale length of the instrument, since they control what the vibrating length of the strings will be.
Nuts are traditionally made from bone, but on cigar box guitars can be made from all sorts of materials: bone, plastic, metal, wood, and even synthetic materials like masonite or Corian.
Here is an article on the subject (Item #3 in the article is specific to your question): https://www.cigarboxguitar.com/knowledge-base/how-to-pick-the-right-strings-for-your-cigar-box-guitar/
Is there a difference in strings used whether it is acoustic or electric.
thanks
Larry