Reactive functional groups, such as N-nitrosamines, impart unique bioactivities to the natural products in which they are found. Recent work has illuminated enzymatic N-nitrosation reactions in microbial natural product biosynthesis, motivating interest in discovering additional metabolites constructed using such reactivity. Here, we use a genome mining approach to identify over 400 cryptic biosynthetic gene clusters (BGCs) encoding homologues of the N-nitrosating biosynthetic enzyme SznF, including the BGC for chalkophomycin, a CuII-binding metabolite that contains a C-type diazeniumdiolate and N-hydroxypyrrole. Characterizing chalkophomycin biosynthetic enzymes reveals previously unknown enzymes responsible for N-hydroxypyrrole biosynthesis, including the first prolyl-N-hydroxylase, and a key step in the assembly of the diazeniumdiolate-containing amino acid graminine. Discovery of this pathway enriches our understanding of the biosynthetic logic employed in constructing unusual heteroatom-heteroatom bond-containing functional groups, enabling future efforts in natural product discovery and biocatalysis.