From a76bd96e4bfa869fd51310574490ff6e2659685a Mon Sep 17 00:00:00 2001 From: enc0urage <127197575+enc0urage@users.noreply.github.com> Date: Tue, 28 Mar 2023 10:18:20 +0000 Subject: [PATCH] nixos/malloc: set vm.max_map_count when using graphene-hardened --- nixos/modules/config/malloc.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/config/malloc.nix b/nixos/modules/config/malloc.nix index 4db0480b155..b740ebfccb2 100644 --- a/nixos/modules/config/malloc.nix +++ b/nixos/modules/config/malloc.nix @@ -97,6 +97,7 @@ in }; config = mkIf (cfg.provider != "libc") { + boot.kernel.sysctl."vm.max_map_count" = mkIf (cfg.provider == "graphene-hardened") (mkDefault 1048576); environment.etc."ld-nix.so.preload".text = '' ${providerLibPath} '';