anchor.diff:          default = 128;
           description = "Maximum number of items to keep in slow log";
           type = with types; int;
  +      };
  +
  +      extraConfig = mkOption {
  +        default = "";
  +        description = "Extra configuration options for redis.conf";
  +        type = with types; string;
         };
       };
   
  
positive.code:     port ${toString cfg.port}
      ${condOption "bind" cfg.bind}
      ${condOption "unixsocket" cfg.unixSocket}
      ${condOption "unixsocketperm" cfg.unixSocketPerm}
      timeout ${toString cfg.timeout}
      tcp-keepalive ${toString cfg.tcpKeepAlive}
      loglevel ${cfg.logLevel}
      logfile ${cfg.logfile}
      databases ${toString cfg.databases}
      ${concatMapStrings (d: "save ${toString (builtins.elemAt d 0)} ${toString (builtins.elemAt d 1)}\n") cfg.save}
      stop-writes-on-bgsave-error ${redisBool cfg.stopWritesOnBgSaveError}
      rdbcompression ${redisBool cfg.rdbCompression}
      rdbchecksum ${redisBool cfg.rdbChecksum}
      dbfilename ${cfg.dbFilename}
      dir ${toString cfg.dbpath}
      ${if cfg.slaveOf != null then "slaveof ${cfg.slaveOf.ip} ${toString cfg.slaveOf.port}" else ""}
      ${condOption "masterauth" cfg.masterAuth}
      slave-serve-stale-data ${redisBool cfg.slaveServeStaleData}
      slave-read-only ${redisBool cfg.slaveReadOnly}
      repl-ping-slave-period ${toString cfg.replPingSlavePeriod}
      repl-timeout ${toString cfg.replTimeout}
      repl-disable-tcp-nodelay ${redisBool cfg.replDisableTcpNodelay}
      slave-priority ${toString cfg.slavePriority}
      ${condOption "requirepass" cfg.requirePass}
      ${concatMapStrings (c: "rename-command ${c} ${getAttr c cfg.renameCommand}\"\n") (attrNames cfg.renameCommand)}
      maxclients ${toString cfg.maxClients}
      ${condOption "maxmemory" cfg.maxMemory}
      maxmemory-policy ${cfg.maxMemoryPolicy}
      appendOnly ${redisBool cfg.appendOnly}
      appendfsync ${cfg.appendFsync}
      no-appendfsync-on-rewrite ${redisBool cfg.noAppendFsyncOnRewrite}
      auto-aof-rewrite-percentage ${toString cfg.autoAofRewritePercentage}
      auto-aof-rewrite-min-size ${toString cfg.autoAofRewriteMinSize}
      lua-time-limit ${toString cfg.luaTimeLimit}
      slowlog-log-slower-than ${toString cfg.slowLogLogSlowerThan}
      slowlog-max-len ${toString cfg.slowLogMaxLen}
    '';
  in
  {
  
negative.code:         default = [ [900 1] [300 10] [60 10000] ];
          description = "The schedule in which data is persisted to disk, represented as a list of lists where the first element represent the amount of seconds and the second the number of changes.";
          example = [ [900 1] [300 10] [60 10000] ];
        };
  
        dbFilename = mkOption {
  