Catalysis of the acetylation of an amino acid residue of a peptide or protein, according to the reaction: acetyl-CoA + peptide = CoA + N-acetylpeptide.