Can't run C++ Debugger in VSCode

Adding

programs.nix-ld.enable = true;

to your configuration.nix solves this.
This let’s you run non-nixos built executables like OpenDebugAD7.

The Nixos vscode page also mentions it but only under the ‘Remote SSH’ section.