Make sure the drupal_local.settings.php.j2 extends  rather than overwriting it.
Ony run specific commands as sudo when necessary instead of all commands as sud by default.