I've had an inguinal hernia and had surgery for it. It's really not too bad. You'll be sore, but nothing intolerable. I wasn't allowed to pick up anything over 10lbs for the first couple weeks and was advised to stay out of the gym for 4-6 weeks. I went ahead and took the full 6 weeks away to make sure I healed all the way. I would advise not to rush it. Make sure your fully healed before going back. You'll eventually be back to doing eactly what you're doing now in the gym. Mine was laparoscopic with minimal scaring. Just 3 tiny incisions below my belly button.
Prior to surgery, I would make sure you have a good supply of a stool softener and a laxative (just in case). Using the bathroom isn't fun for the first couple weeks and you don't want to "push". Anything you can do to make that process more gentle will make your life so much better. My surgeon advised me to get up and walk when I was able to, but not to overdo it. You'll know if you do. I wasn't able to lay flat for a few weeks, so I slept at an incline to be more comfortable. Also made getting up and down easier.
Overall it's really not too bad. You'll be sore, but it's nothing crazy unless you're trying to move around and do more than you should. I took it easy and just walked. You got this.