anchor.diff:    name = cfg.package.pname;
     pkg = cfg.package;
     optionYesNo = option: if option then "yes" else "no";
  +  # configuration on media directory
  +  mediaDirectory = {
  +    options = {
  +      path = mkOption {
  +        type = types.str;
  +        description = ''
  +          Absolute directory path to the media directory to index.
  +        '';
  +      };
  +      recursive = mkOption {
  +        type = types.bool;
  +        default = false;
  +        description = "Whether the indexation must take place recursively or not.";
  +      };
  +      hidden-files = mkOption {
  +        type = types.bool;
  +        default = true;
  +        description = "Whether to index the hidden files or not.";
  +      };
  +    };
  +  };
  +  toMediaDirectory = d: "<directory location=\"${d.path}\" mode=\"inotify\" recursive=\"${optionYesNo d.recursive}\" hidden-files=\"${optionYesNo d.hidden-files}\" />\n";
  +
     transcodingConfig = if cfg.transcoding then with pkgs; ''
       <transcoding enabled="yes">
         <mimetype-profile-mappings>
  
positive.code:         '';
        };
  
        customCfg = mkOption {
          type = types.bool;
          default = false;
  
negative.code:       </extended-runtime-options>
      </server>
      <import hidden-files="no">
        <autoscan use-inotify="auto">
        ${concatMapStrings toMediaDirectory cfg.mediaDirectories}
        </autoscan>
        <scripting script-charset="UTF-8">
          <common-script>${pkg}/share/${name}/js/common.js</common-script>
          <playlist-script>${pkg}/share/${name}/js/playlists.js</playlist-script>
  