Ummm maybe i’m mistaken again, but i think R25 & R26 will work well for this purpose. Attaching the MOS gate to VUSB gives two posibilities:
-if USB is disconected, VUSB is low and MOS is enabled -> NANO is battery powered
-if USB is powered VUSB will be higher than 2.5V leaving a Vgs < 1.3V not enough to turn the MOS on -> NANO will be USB powered.
By the way, in the circuit depicted in the manual schematics, LTC4054 (U1) is programmed to have a programming current of 500mA. And the current required by NANO is less than that. An easy trick will be to remove D3 diode, because if NANO is USB powered, U1 will try to charge the battery but it will also supply the circuit too. Battery charge will be slower but it will be controlled by LTC4054 and not by a diode.
I’ve removed D3(S34) in my Nano and everything runs smooth…