anchor.diff:  let
   
     cfg = config.services.samba;
  -
  -  logDir = "/var/log/samba";
  -  privateDir = "/var/samba/private";
   
     samba = cfg.package;
   
     setupScript =
       ''
  -      if ! test -d /var/samba ; then
  -        mkdir -p /var/samba/locks /var/samba/cores/nmbd  /var/samba/cores/smbd /var/samba/cores/winbindd
  -      fi
  -
  -      passwdFile="$(${pkgs.gnused}/bin/sed -n 's/^.*smb[ ]\+passwd[ ]\+file[ ]\+=[ ]\+\(.*\)/\1/p' ${configFile})"
  -      if [ -n "$passwdFile" ]; then
  -        echo 'INFO: [samba] creating directory containing passwd file'
  -        mkdir -p "$(dirname "$passwdFile")"
  -      fi
  -
  -      mkdir -p ${logDir}
  -      mkdir -p ${privateDir}
  +      mkdir -p /var/lock/samba /var/log/samba /var/cache/samba /var/lib/samba/private
       '';
   
     shareConfig = name:
  
positive.code:     services.samba = {
  
        enable = mkOption {
          default = false;
          description = "
            Whether to enable Samba, which provides file and print
            services to Windows clients through the SMB/CIFS protocol.
          ";
        };
  
        package = mkOption {
          default = pkgs.samba;
          example = pkgs.samba4;
          description = ''
  
negative.code: 
        shares = mkOption {
          default = {};
          description = ''
            A set describing shared resources.
            See <command>man smb.conf</command> for options.
          '';
          type = types.attrsOf (types.attrsOf types.unspecified);
          example =
            { srv =
               { path = "/srv";
  