What OS did Steve Jobs and his team use to build the NeXT OS?

I've been wondering for a while...

Were they using a barebones .NIX OS and building on top of it, or were they rocking Macintoshes or... Windows machines?

What do you think Steve was using for a personal machine at this time?

Did the NeXT team write the OS from the ground up or build off of existing Unix boxes?