After making a few stupid mistakes when I was young, I now NEVER buy anything just because it is a "good deal." Not even stocks.
The most important criterion is to get what you want/need; price is important, but it is secondary.
I would buy an iMac that will be supported for at least a few years, i.e., one that is less than 5 years old.