There is a enableDebugging function that can be used to enable debugging symbols:
$ nix-build -E 'with import <nixpkgs> {}; enableDebugging hello'
$ file result/bin/hello
result/bin/hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, with debug_info, not stripped