I'm assuming that the desktop you mention is one of the non-Mac machines listed in your signature?
If so, then you're limited to non-OSX operating systems (you can run OSX on non-Apple hardware but it's fiddly to do, breaches the license agreement, is unstable and doesn't really have any benefits other than being familiar).
Given this, I'd say Windows 7 makes a perfectly suitable file-sharing OS. As a general rule Windows makes a better server for Macs that Macs do for Windows, it tends to be faster than OSX at file-sharing and is more compatible with Windows while being not much less compatible with Macs than OSX.
If you've only got one or two HDs in the desktop and want to continue using it as a desktop then Windows 7 will more than do the job. If you've got more disks and want to use things like RAID then you might need something more sophisticated such as Windows Home Server or an Open Source NAS solution. Have a look at this post for some ideas:
https://forums.macrumors.com/showthread.php?p=13042520&#post13042520. If you go down this route though you may be better to consider getting a dedicated server system rather than re-using your desktop, but of course this starts to get expensive.
Remember that if you use something like FreeNAS or Linux you may not be able to continue using it as a desktop or will at least be restricted in what you can run.
Incidentally, you can ignore the bit about needing computers to be running Windows 7 to participate in a homegroup. Windows 7 can still share files across all versions of Windows, Mac OSX and most Linux implementations. The homegroup stuff is just a way to avoid having to set-up individual user accounts and is intended to make sharing easier for people who are inexperienced.
Hope that helps.