Create a basecurve
Take an image of a high dynamic range scene ( eg. black and white ), out of focus, with all dynamic processing ( active d-lighting, scenes, sharpening, noise reduction, etc. ) off and with raw+jpg fine.
Place RAW+JPG in a folder and:
dt-curve-tool-helper DSC_9903.NEF
then:
dt-curve-tool -z -e DSC_9903.NEF -n 16 | tee nikon_curves.sh
then:
backup ~/.config/darktable/data.db and library.db
sh ./nikon_curves.sh