anchor.diff:  
   let
     cfg = config.services.redis;
  -  redisBool = b: if b then "yes" else "no";
  -  condOption = name: value: if value != null then "${name} ${toString value}" else "";
  -
  -  redisConfig = pkgs.writeText "redis.conf" ''
  -    port ${toString cfg.port}
  -    ${condOption "bind" cfg.bind}
  -    ${condOption "unixsocket" cfg.unixSocket}
  -    daemonize no
  -    supervised systemd
  -    loglevel ${cfg.logLevel}
  -    logfile ${cfg.logfile}
  -    syslog-enabled ${redisBool cfg.syslog}
  -    databases ${toString cfg.databases}
  -    ${concatMapStrings (d: "save ${toString (builtins.elemAt d 0)} ${toString (builtins.elemAt d 1)}\n") cfg.save}
  -    dbfilename dump.rdb
  -    dir /var/lib/redis
  -    ${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}
  -  '';
  +
  +  mkValueString = value:
  +    if value == true then "yes"
  +    else if value == false then "no"
  +    else generators.mkValueStringDefault { } value;
  +
  +  redisConfig = pkgs.writeText "redis.conf" (generators.toKeyValue {
  +    listsAsDuplicateKeys = true;
  +    mkKeyValue = generators.mkKeyValueDefault { inherit mkValueString; } " ";
  +  } cfg.settings);
   in
   {
     imports = [
  
positive.code:         description = "Maximum number of items to keep in slow log.";
        };
  
        extraConfig = mkOption {
          type = types.lines;
          default = "";
          description = "Extra configuration options for redis.conf.";
        };
      };
  
  
negative.code:     (mkRemovedOptionModule [ "services" "redis" "dbFilename" ] "The redis module now uses /var/lib/redis/dump.rdb as database dump location.")
      (mkRemovedOptionModule [ "services" "redis" "appendOnlyFilename" ] "This option was never used.")
      (mkRemovedOptionModule [ "services" "redis" "pidFile" ] "This option was removed.")
      (mkRemovedOptionModule [ "services" "redis" "extraConfig" ] "Use services.redis.settings instead.")
    ];
  
    ###### interface
  