Enabling fan control on a Raspberry Pi

Hello everyone!

First post here, a few months after having started with NixOS (this is an indirect compliment to the documentation and the community content - searching through it was enough up to today :slight_smile: ).

I have installed and deployed NixOS on my RPI4, and I have the official RPI fan that is plugged on the GPIO pins. I’d like to control the fan speed based on the temperature of the CPU - the same way you can configure it in raspi-config in RaspiOS.

Is there something already packaged that I wouldn’t have found to do it already? And if not, how would you suggest I set this up?

Thanks a lot for your help :smiley: