summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services/databases/redis.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/databases/redis.nix')
-rw-r--r--nixos/modules/services/databases/redis.nix11
1 files changed, 5 insertions, 6 deletions
diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix
index 1da2fa9f1160..ad88a4f589a2 100644
--- a/nixos/modules/services/databases/redis.nix
+++ b/nixos/modules/services/databases/redis.nix
@@ -57,9 +57,9 @@ in {
package = mkPackageOption pkgs "redis" { };
vmOverCommit = mkEnableOption ''
- setting of vm.overcommit_memory to 1
+ set `vm.overcommit_memory` sysctl to 1
(Suggested for Background Saving: <https://redis.io/docs/get-started/faq/>)
- '';
+ '' // { default = true; };
servers = mkOption {
type = with types; attrsOf (submodule ({ config, name, ... }: {
@@ -312,10 +312,9 @@ in {
'';
}) enabledServers);
- boot.kernel.sysctl = mkMerge [
- { "vm.nr_hugepages" = "0"; }
- ( mkIf cfg.vmOverCommit { "vm.overcommit_memory" = "1"; } )
- ];
+ boot.kernel.sysctl = mkIf cfg.vmOverCommit {
+ "vm.overcommit_memory" = "1";
+ };
networking.firewall.allowedTCPPorts = concatMap (conf:
optional conf.openFirewall conf.port