Make time auto shutoff PC fan - safe?
Based on your previous question, you're beginning to get into &quot;use a microprocessor&quot; territory.
That said, the 555 is once again your friend. This IC comes in a 2-per package called the 556, and it's available in CMOS as the TLC556. Use one of them for your one-shot timer, and the other to make your PWM speed.
Basically,

timer ON: run PWM at setting
timer OFF: force PWM to 0%

The TLC556 datasheet is here: https://www.ti.com/product/TLC556
When you get tired of that, consider using something like an ATTiny.
Also, another idea: when the fan PWM is low, that stops the fan. If that's all you care about (assuming you gave up on the speed control idea) the circuit gets a lot simpler since you're only dealing with a logic input rather than switching power off. Still, the 555 will work better, especially for such a long time.
Even better, consider the CD4060 ripple counter. Then you're not dealing with stupidly-large capacitors for the long delays.