State tax filing

Is this only the case if you work for your home state member, or can you qualify if you work for a federal agency if you plan to return to your home state afterward?