You’ll need to be a bit more specific about the iMac. What year is it?
If it’s pre-2017, I’d expect some difficulty with the WiFi. If it’s newer, you might have luck with wiki.t2linux.org/distributions/…/installation/ . I haven’t followed that guide, so YMMV.