that kind of restriction is generally not enforceable in states like california unless you explicitly get some kind of consideration (e.g., compensation) for it.
since it’s above and beyond customary work duties, you’d expect extra compensation of some kind to have you refrain from projects unrelated to the job. there are some exceptions of course. security-related government workers could be subject to extra restrictions without extra compensation, for example.