Nice! I actually did something similar. In my case I ended up using an old PWM fan I had lying around, powering it through the 12V pin input. Then I used ground on pin 6 and the PWM signal from GPIO pin 11. I wrote a bash script and set it up as a service that controls the fan speed based on five temperature levels.
Right now I’m running it on FriendlyElec CM3588 NAS with Armbian Linux 6.1.115-vendor-rk35xx (v26.2 rolling).
The repo is in Spanish for now, but I’m planning to translate it to English soon:
https://github.com/jgomezriesgobancario/cm3588-fan-controller
**edited** Fix typos