The electrical conductance of atomic metal contacts represents a powerful tool for detecting nanomagnetism. Conductance reflects magnetism through anomalies at zero bias--generally with Fano line shapes--owing to the Kondo screening of the magnetic impurity bridging the contact. A full atomic-level understanding of this nutshell many-body system is of the greatest importance, especially in view of our increasing need to control nanocurrents by means of magnetism. Disappointingly, at present, zero-bias conductance anomalies are not calculable from atomistic scratch. Here, we demonstrate a working route connecting approximately but quantitatively density functional theory (DFT) and numerical renormalization group (NRG) approaches and leading to a first-principles conductance calculation for a nanocontact, exemplified by a Ni impurity in a Au nanowire. A Fano-like conductance line shape is obtained microscopically, and shown to be controlled by the impurity s-level position. We also find a relationship between conductance anomaly and geometry, and uncover the possibility of opposite antiferromagnetic and ferromagnetic Kondo screening--the latter exhibiting a totally different and unexplored zero-bias anomaly. The present matching method between DFT and NRG should permit the quantitative understanding and exploration of this larger variety of Kondo phenomena at more general magnetic nanocontacts.