anchor.diff:        configFile = mkOption {
           description = "
             internal use to pass filepath to samba pam module
  +        ";
  +      };
  +
  +      configText = mkOption {
  +        type = types.nullOr types.lines;
  +        default = null;
  +        description = "
  +          Verbatim contents of smb.conf. If null (default), use the
  +          autogenerated file from NixOS instead.
           ";
         };
   
  
positive.code:       ${optionalString cfg.syncPasswordsByPam "pam password change = true"}
  
        ${cfg.extraConfig}
      '';
  
    # This may include nss_ldap, needed for samba if it has to use ldap.
    nssModulesPath = config.system.nssModules.path;
  
negative.code:     '';
  
    configFile = pkgs.writeText "smb.conf"
      (if cfg.configText != null then cfg.configText else
      ''
        [ global ]
        log file = ${logDir}/log.%m
  