Ok - having set up a TimeMachine share on a linux server, I can safely say that it's not simple.
Apple has engineered the software to make it rather difficult at best. It CAN be done as you suggest, but you'll have to jump through some hoops first.
There are several websites with how-tos. They're all pretty specific to a single setup (like a particular vendor's NAS box). You'll need to read a couple and see how to apply the information to your particular setup.
And the big caveat: While the time machine will work for normal activities, it may not support a full restore as there are settings that need to be tweaked on the Mac. If you get a new one and want to restore from timemachine, you may not be able to break into the normal restore process to update those settings.