How to override a variable declared in NixOS options?

I need to modify this line found in config for the bumblebee NixOS option

It shouldn’t be kernel.nvidia_x11.bin because I use a legacy nvidia driver. How can I change it to something like
boot.extraModulePackages = optional useBbswitch kernel.bbswitch ++ optional useNvidia kernel.nvidia_x11_legacy390.bin;?

Nothing about there here?