flex temp is a crew selection made into the FMGC/FMS based on aircraft weight and environmental conditions
Correct.
how do you derive what the flex temp setting is and what does this give you in terms of N1/N2
You generally don't derive it yourself, you look it up in the aircraft performance tables like you do with the take off speeds. I seem to remember that when you've entered a FLX temp the upper ECAM display will show the target derated EPR/N1 which you will compare against the achieved EPR/N1 to check the aircraft is producing the required thrust. We generally didn't/don't monitor N2 apart from checking it looks like it's in roughly the right place.