Getting older nixpkgs in nix-shell, if system uses nix flakes

Hi everyone.
I currently have the issue that I’m getting older nixpkgs in nix-shell, when my system uses nix flakes.

I use nix flakes for all my systems (GitHub - pbek/nixcfg: NixOS config).
To develop for example Qt apps and open IDEs like Qt Creator and Clion with the Qt dev tools I use nix-shells, like

My issue is that my desktop (KDE Plasma) uses a newer Qt version than I get in the nix-shell, which causes errors like: Fatal: Cannot mix incompatible Qt library (5.15.10) with this library (5.15.9)

How can I use the same nixpkgs in the nix-shell with import <nixpkgs> than I use in my flake?

I think I did it with desktop-common: attempt to override the nixPath with the flake's nixp… · pbek/nixcfg@7cddcb4 · GitHub!