When I open a raw file in Darktable sharpening and a base curve are automatically applied. How do I alter this? I would like to add lens correction.
Automatic presets would do that, see the section "Module presets" in Darktable's user manual. Note that you need Darktable version > 1.4 for this to work sensibly with lens correction. In earlier versions the lens correction did not adapt correctly to the image parameters.
Relevant section from the manual:
In its default setting darktable will only expand one GUI at a time. If you click the expander bar of another module, the previous GUI gets collapsed. If you want to see more than one GUI expanded, you may expand further modules with shift-click – all previously expanded GUIs remain opened. The expander bar behavior on click and shift-click, respectively, is controlled by a preference setting in gui options (see Section 8.1, “GUI options”).