MOSFETs current regulators 1 input
You can do this, but it may not be a good idea.
If you look at the output characteristic curves of a MOSFET:

You can see that the FET is a good current source say from 1V to 50V with Vgs=4.5V.  The drain current varies only very slightly. (If you want to operate with a 3.3V supply only, you'll need a low Vth FET.)
However, the threshold of the FET will shift dramatically with temperature, so you won't get the SAME constant current as the temperature of your device changes.
Also, because the threshold varies considerably from part to part, if you build more than one of these you will also have a different load current.
The current will also be non-linear with respect to the applied gate voltage.
If any of that matters to you, you're much better off using an op-amp and negative feedback to create a current sink for accurate, repeatable current, as in this application circuit from ADI/LT: