Hard drive failed in mine...I used an external for a while- didn't have the guts to actually try to replace it myself, so I opted for a 2012 mini with a 27" Planar monitor. BUT I must confess I miss that computer a lot...I still have it and may resurrect it some day. Other than the hard drive issue I had no problems at all...and I liked snow leopard. The newer imacs are impossible to replace a hard drive (I would think- I mean by yourself) thats why I opted for the mini. I miss my imac though.
It's not that expensive to bring it back to life:
Takes 1.5-2 hours of labour for me to strip down, clean out, fit ssd, inexperienced tech 3 hours maximum. Wear surgical gloves for removal and replacement of screen glass and lcd and give the surfaces a good clean making sure front glass has no smudges on both sides! Bit of chrome polish and thermal paste. The rest you can DIY.
Usb stick 8gb, download Yosemite installer into applications and diskmaker x too on another Mac. Create boot usb on your stick.
NWT adaptadrive bracket just over 20 bucks do not scrimp and buy the plastic icy box caddies etc they are absolute rubbish!
Ssd of your choice, mx100 is 70 bucks for 128 and anything up to 512gb is worthwhile economically imo
Memory upgrades if it's a mid 2007 and 4gb in particular are expensive, other older models and newer than the 2007 that don't use ddr2-800 are far cheaper. Max out ideally as it will never be opened again till end of life.
The newer 2012 on iMac can be done but it's far more difficult needing a heat gun to remove the glue and new adhesive ring to replace for starters.
You will find after that even a mid 2007, end of life with Yosemite most likely will run it superbly till the OS is obsolete!