Pistol is infamous to be the worst firearm, but it's dominating-viable. At the very least, it's more viable than throwing knife build. You need max Dex + gunslinger + jkk armor to make it spammable, which increased the damage a lot. Sharpshooter and critical power helps a bit with your crit damage. Alternatively, you could use 9mm Falchion, which has better damage range and better crit chance
Also, keep in mind that it's possible to use chemical pistol, energy pistol, or even SMG in "pistoleer" build. Chem has a lot of great CC capability and you only need Cooked Shot feat, while energy works great on heavy armored enemies and it doesn't need any special feat (although you could use high-technicality if you have 8+ INT, and maybe Practical Physicist if you're going crit build)