When someone asks me Ou travailles-tu?

Is it okay to say Je ne travaille pas?

Yes, that makes sense because they are asking where do you work, but since you don't work, you cant give a place, therefore you must answer in the way that you did.