From 840f3230a202e40a4107c4ce0ccb910be69c2792 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 14 Apr 2016 13:15:20 +0200 Subject: [PATCH] Restore default core limit of 0:infinity Continuation of 79c3c16dcbb3b45c0f108550cb89ccd4fc855e3b. Systemd 229 sets the default RLIMIT_CORE to infinity, causing systems to be littered with core dumps when systemd.coredump.enable is disabled. This restores the 15.09 soft limit of 0 and hard limit of infinity. --- nixos/modules/system/boot/coredump.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/system/boot/coredump.nix b/nixos/modules/system/boot/coredump.nix index 3d80da9e457..793c7515c76 100644 --- a/nixos/modules/system/boot/coredump.nix +++ b/nixos/modules/system/boot/coredump.nix @@ -50,6 +50,11 @@ with lib; (mkIf (!config.systemd.coredump.enable) { boot.kernel.sysctl."kernel.core_pattern" = mkDefault "core"; + + systemd.extraConfig = + '' + DefaultLimitCORE=0:infinity + ''; }) ];