I do a bit of both. I try to keep enough cash on hand to buy one if a good one pops up in the store, usually buying 2-3 per month. And I also farm 5-10 per day. This has been my routine for many months.
I would say that over time that my successes come from both about equally. Success is defined as a slot, boost type & primary that I want - and a secondary that I'm looking for with 1-2 increases on it. Examples would be "CC Arrow, Speed Primary, +4.5% CC, +whatever" and "Potency Cross, Potency Primary, +10 speed, +whatever."
Each month I end up with a couple successes, maybe 2-3x that many partial successes (usually meaning the secondary I wanted didn't increase, or the +whatever was complete junk like +%Def for Raid Han), and a BUNCH of expensive disappointments and outright sales-fodder.
It's costly, both in energy and credits on attempts that didn't pan out. But I look at it as the cost of progress, or at least as the cost of staying semi-competitive.
-edit-
I do have a few great mods out of all of that work (typically meaning+15-20 speed secondary) but only 10 or so total, after 18ish months of playing. And I have no "Jackpot!!" level mods. +20 speed secondary is my best and I only have 1 of those.