You cannot receive residency the other way around, i.e. if you are working and your wife is not. It is a particular right just for EU citizens that if they are making use of freedom of movement rights (most commonly by working or studying), that their partner from outside the EU has the right to a residency permit. If she works, it needs to be a job of at least 4-5 hours a week (or an income of about 100€ a month) in order for her to receive worker status and have the right for you to live here. If she only works a low amount, e.g. a Minijob, then the authorities may say this is not enough. However, there are court decisions which have confirmed that even earning a low income gives someone these rights.
If she works in another city, then your rights as a family member will be secured. However, in this situation the authorities are likely to examine your relationship more closely. As your residency rights will be solely as a result of the marriage, they may doubt whether it is a real relationship. You may be asked to provide evidence of the relationship and interviewed separately about each other. You are not, however, obliged to live together.