Setup discourse.domain.com with main site at domain.com

Yes you can. I hope you get it working.