Get the node ID from the "node/add" menu item and hook_form_alter()
You're right, the nid is not available at this point, it's assigned only after the the node is saved.

The easiest solution is most probably to use hook_node_insert and resave the node after having added the value to the field you have created.