Script flares onto lights?

I’m creating a light source via a script, which also determines its intensity, colour, type and all. Now I’d like to also give it a flare (and maybe a halo, because why not).

Can anyone tell me how to assign a flare to a light purely via a C# script, and no fiddling with the editor?

I haven’t yet been able to make it work, so thanks for any help!

The code is right there: Unity - Scripting API: Light.flare