VSCode remote/SSH developement: How do I make it automatically switch into the nix shell?

I would like to use VSCode to work on a project remotely (ssh) which uses nix flakes. This would require starting the VSCode remote server inside of the development shell, I think. I have looked into the “Nix Environment selector” plugin, but it does not support flakes (Although it might be possible to create a shell.nix which just calls the flake.nix).

Any help would be appreciated

you can use direnv and direnv-vscode to do this

and then you won’t have to start vscode inside of the development shell