anchor.diff:      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}
  +    ${cfg.extraConfig}
     '';
   in
   {
  
positive.code:         default = 128;
          description = "Maximum number of items to keep in slow log";
          type = with types; int;
        };
      };
  
  
negative.code:         process, otherwise the master will refuse the slave request.'';
        };
  
        requirePass = mkOption {
          default = null;
          description = "Password for database";
          example = "letmein!";
        };
  
        appendOnly = mkOption {
          default = false;
          description = "By default data is only periodically persisted to disk, enable this option to use an append-only file for improved persistence.";
  