Shell.nix that depends on flake?

Instead of writing a shell.nix, consider adding a devShells.default attribute to your flake.nix outputs.

Alternatively, you could set a system channel in your flake and have the shell.nix reference that channel?