How long were you working out regularly before the surgery? I think that has a lot to do with how quickly you'll recover. If you've been working out steadily for a long period of time, I think you could easily go a month or two without working out, and then step back into it pretty quickly.
I broke my hand a few years back and had to take about 6 - 8 weeks with no lifting, and then several weeks after that where I could only lift light weights, but it had a fairly negligible impact on my overall fitness. You just find different things to do that don't hurt.
I also had a minor surgery last December and was told no gym for two weeks, then only light cardio for a period of time after that (no lifting). The first day back I just walked on a treadmill for 15 minutes and I felt like I was going to throw up or pass out (or both, lol), but... I did it again the next day, and the next, and was back to normal in no time. I started lifting again a week after that (light weight or machine assisted to start), and was back to my regular return in January.
So yeah... I guess the moral of the story is... if you've been treating your body well up until now, don't use the surgery as an excuse to fall into bad habits (i.e. bad diet, no physical activity, etc). Eat healthier now than you even normally would, go for a walk if you can't do anything else, etc. I think you'll find the time off won't affect you much at all.