anchor.diff:          example = "/var/run/redis.sock";
         };
   
  -      unixSocketPerm = mkOption {
  -        default = null;
  -        description = "Permissions for the socket";
  -      };
  -
  -      timeout = mkOption {
  -        default = 0;
  -        description = "Close the connection after a client is idle for N seconds (0 to disable)";
  -        type = with types; int;
  -      };
  -
  -      tcpKeepAlive = mkOption {
  -        default = 0;
  -        description = "If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence of communication.";
  -        example = 60;
  -        type = with types; int;
  -      };
  -
         logLevel = mkOption {
           default = "notice"; # debug, verbose, notice, warning
           example = "debug";
  
positive.code:         type = with types; string;
        };
  
        noAppendFsyncOnRewrite = mkOption {
          default = false;
          description = "Do not allow fsyncing of append-only log during rewrites";
          type = with types; bool;
        };
  
        autoAofRewritePercentage = mkOption {
          default = 100;
          description = "Automatically rewrite (= reduce size) of append-only file when file grows with this percentage.";
          type = with types; int;
        };
  
        autoAofRewriteMinSize = mkOption {
          default = "64mb";
          description = "Minimal size to start rewriting.";
          type = with types; string;
        };
  
        luaTimeLimit = mkOption {
          default = 5000;
          description = "Maximum execution time for Lua scripts in milliseconds";
          type = with types; int;
        };
  
        slowLogLogSlowerThan = mkOption {
          default = 10000;
          description = "Log queries whose execution take longer than X in milliseconds";
  
negative.code:     port ${toString cfg.port}
      ${condOption "bind" cfg.bind}
      ${condOption "unixsocket" cfg.unixSocket}
      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}
      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}
      ${condOption "requirepass" cfg.requirePass}
      appendOnly ${redisBool cfg.appendOnly}
      appendfsync ${cfg.appendFsync}
      slowlog-log-slower-than ${toString cfg.slowLogLogSlowerThan}
      slowlog-max-len ${toString cfg.slowLogMaxLen}
      ${cfg.extraConfig}
    '';
  in
  {
  