nixos/redis: fix merging

https://github.com/NixOS/nixpkgs/pull/71584 did merging without mkMerge.

cc @jtojnar
This commit is contained in:
Florian Klink 2019-11-08 15:37:30 +01:00
parent a2429cffa3
commit 6303131eb9

View file

@ -185,10 +185,10 @@ in
###### implementation
config = mkIf config.services.redis.enable {
boot.kernel.sysctl = {
"vm.nr_hugepages" = "0";
} // mkIf cfg.vmOverCommit { "vm.overcommit_memory" = "1"; };
boot.kernel.sysctl = (mkMerge [
{ "vm.nr_hugepages" = "0"; }
( mkIf cfg.vmOverCommit { "vm.overcommit_memory" = "1"; } )
]);
networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [ cfg.port ];