I am unsure about the appropriateness of the question https://academia.stackexchange.com/questions/16215/modafinil-for-academics.
For background, Wikipedia informs us that modafinil is better known in the US by its brand name, Provigil, and is a "vigilance promoting" drug currently approved for the treatment of various sleep disorders. The question seems to ask about using it in what we might call a "performance enhancing" role, rather than for a specific medical condition. In the US, modafinil is available by prescription only and is a controlled substance, so using it without the supervision of a physician would probably be illegal (IANAL).
There is a long history of academics using psychoactive drugs to improve their work, and arguably questions about drug use in academia are on-topic. However, the current question has a "how-to" flavor which makes me less comfortable. I would rather not see this site move in that direction.
If any SE moderators/admins wish to weigh in on potential legal issues, that would be welcome as well.