]> Git — Sourcephile - sourcephile-nix.git/blob - nixpkgs/patches/systemd-coredump.diff
f3: uninstall because broken
[sourcephile-nix.git] / nixpkgs / patches / systemd-coredump.diff
1 diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
2 index 77997ac7686..b1d87e6253a 100644
3 --- a/nixos/modules/system/boot/systemd.nix
4 +++ b/nixos/modules/system/boot/systemd.nix
5 @@ -1018,6 +1018,18 @@ in
6 [Coredump]
7 ${config.systemd.coredump.extraConfig}
8 '';
9 + # CORENAME_MAX_SIZE being only 128, overflowing happens
10 + # when the Nix store path includes a cross-compiling suffix,
11 + # hence this workaround to use a shorter path.
12 + "systemd/coredump".source = "${systemd}/lib/systemd/systemd-coredump";
13 + "sysctl.d/50-coredump.conf".source = pkgs.runCommand "50-coredump.conf" {
14 + preferLocalBuild = true;
15 + coredumpConf = "${systemd}/example/sysctl.d/50-coredump.conf";
16 + } ''
17 + substitute $coredumpConf $out \
18 + --replace 'core_pattern=|${systemd}/lib/systemd/systemd-coredump' \
19 + 'core_pattern=|/etc/systemd/coredump'
20 + '';
21
22 "systemd/logind.conf".text = ''
23 [Login]
24 @@ -1034,7 +1046,6 @@ in
25 '';
26
27 # install provided sysctl snippets
28 - "sysctl.d/50-coredump.conf".source = "${systemd}/example/sysctl.d/50-coredump.conf";
29 "sysctl.d/50-default.conf".source = "${systemd}/example/sysctl.d/50-default.conf";
30
31 "tmpfiles.d".source = (pkgs.symlinkJoin {