Gratifying vanity with vanity keys

I found out about the Nostr social network a couple months ago. The network is based on public key cryptography. While browsing the feeds, I noticed some people had really nice public keys which contained their username in some form, like Snowden’s npub1sn0wdenkukak0d9dfczzeacvhkrgz92ak56egt7vdgzn8pv2wfqqhrjdv9. My key is still being generated, since my username is quite a mouthful. So I wondered if GPG keys can be generated like this too. And of course, they can.