Bayern Munich extended their unbeaten streak to 45 games with a 2-0 victory in the Bavarian derby at Nurnberg.