1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

Add extraConfig option to redis

This commit is contained in:
Andrew Seward 2020-10-29 23:35:50 -07:00
parent c2124383f4
commit 58fd716d05

View file

@ -52,6 +52,12 @@ in
default = false; default = false;
description = "By default data is only periodically persisted to disk, enable this option to use an append-only file for improved persistence."; description = "By default data is only periodically persisted to disk, enable this option to use an append-only file for improved persistence.";
}; };
services.redis.extraConfig = mkOption {
type = types.lines;
default = "";
description = "Additional text to be appended to <filename>redis.conf</filename>.";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -69,6 +75,7 @@ in
${optionalString (cfg.unixSocket != null) "unixsocket ${cfg.unixSocket}"} ${optionalString (cfg.unixSocket != null) "unixsocket ${cfg.unixSocket}"}
dir ${cfg.dataDir} dir ${cfg.dataDir}
appendOnly ${if cfg.appendOnly then "yes" else "no"} appendOnly ${if cfg.appendOnly then "yes" else "no"}
${cfg.extraConfig}
''; '';
}; };