I have a simple question:
No, you can't
It says clearly in nondetection's spell description:
The target can't be targeted by any divination magic
"Any" includes your own, so no divination spells would affect the target, unless that spell says otherwise.
Detect magic is an AOE spell that targets the caster as the point of origin as stated in the rules for targeting:
A spell's description tells you whether the spell targets creatures, objects, or a point of origin for an area of effect
And thus the spell cannot target the caster.
Of course you can in any world ran in a sensible manner
When you cast a buff on yourself, or get a magic item which casts a buff, and the net effect is "oh dear by strict RAW I now can't use beneficial spells" then you have found a loophole.
Any DM worth the title will ignore that loophole and just let you cast detect magic and have it work as normal on anything that isn't you.
The nondetection ability is meant to be so that you can't be detected or seen by divination, not to prevent you from divining information yourself.