The understanding of how the spin moment of a magnetic molecule transfers to a carbon nanotube, when the molecule is attached to it, is crucial for designing novel supramolecular spin devices. Here we explore such an issue by modeling the spin transport of a single-walled carbon nanotube grafted with one nickelocene molecule. In particular we investigate how the electron transport becomes spin-polarized depending on the specific linking group bonding nickelocene to the nanotube. We consider as linkers both aziridine and pyrrolidine rings and the amide group. Our calculations show that, at variance with aziridine, both pyrrolidine and amide, do alter the sp2 character of the binding site of the nanotube and thus affect the transmission around the Fermi level. However, only aziridine allows transferring the spin polarization of the nickelocene to the nanotube, whose conductance at the Fermi level becomes spin-polarized. This suggests the superiority of aziridine as a linker for grafting magnetic molecules onto carbon nanotubes with efficient spin filtering functionality.