From b187c869f4cf3d8daf052a8d21207a806638ddc4 Mon Sep 17 00:00:00 2001 From: Jookia <166291@gmail.com> Date: Sun, 10 Jul 2016 10:45:18 +1000 Subject: [PATCH] systemd-coredump: Add systemd service and fix sysctl pattern. --- nixos/modules/system/boot/coredump.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/coredump.nix b/nixos/modules/system/boot/coredump.nix index 793c7515c761..b27a35b6257d 100644 --- a/nixos/modules/system/boot/coredump.nix +++ b/nixos/modules/system/boot/coredump.nix @@ -36,6 +36,8 @@ with lib; config = mkMerge [ (mkIf config.systemd.coredump.enable { + systemd.additionalUpstreamSystemUnits = [ "systemd-coredump.socket" "systemd-coredump@.service" ]; + environment.etc."systemd/coredump.conf".text = '' [Coredump] @@ -45,7 +47,7 @@ with lib; # Have the kernel pass core dumps to systemd's coredump helper binary. # From systemd's 50-coredump.conf file. See: # - boot.kernel.sysctl."kernel.core_pattern" = "|${pkgs.systemd}/lib/systemd/systemd-coredump %p %u %g %s %t %e"; + boot.kernel.sysctl."kernel.core_pattern" = "|${pkgs.systemd}/lib/systemd/systemd-coredump %P %u %g %s %t %c %e"; }) (mkIf (!config.systemd.coredump.enable) {