Your description of the subjective effects of modafinil sound almost identical to those of Adderall (d-amphetamine). Adderall has a very well established short-term safety profile in therapeutic doses, but long-term use, especially at moderate to high doses, can lead to severe dependency and a host of health problems, in a very similar manner to cocaine. If what you say is true that Modafinil doesn't have the high addictive potential of amphetamines and cocaine, that sounds very appealing, but taking any drug even once if it's too new to know if there are long-term side effects from short-term use really scares me. I'm glad you conclude that sleep, nutrition, and exercise are preferable.
P.S. Wikipedia says Modafinil is Schedule IV in the U.S., which means that, like cocaine and morphine (Schedule II), Modafinil is illegal unless you have a prescription.
It's not that similar to Adderall or other amphetamines. The mechanism of action is different. There is some overlap in effect but it's quite different. Amphetamines will provide intense focus and are generally short lived. Modafinil will provide improved focus and alertness and is long lived. The focus is nowhere near as intense.
Adderall and cocaine are even less similar. Cocaine is purely a psychological addiction. Amphetamines have both psychological and physical addiction. Modafinil has little to no addiction. Over time your body will get more efficient at breaking down modafinil down so you may need to increase dose but that's it. There are studies done over years but there aren't any extremely long term ones yet.
While still illegal schedule IV is nothing like schedule II. LE generally doesn't care that much about IV. I've read about schedule IV drugs being opened by customs and allowed through. Think of IV as less than being caught with a joint.
P.S. Wikipedia says Modafinil is Schedule IV in the U.S., which means that, like cocaine and morphine (Schedule II), Modafinil is illegal unless you have a prescription.