Revive systemd.coredump.enable
This commit is contained in:
parent
5200f5fafc
commit
37c22b9d30
|
@ -739,7 +739,7 @@
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
This also configures the kernel to pass coredumps to <literal>systemd-coredump</literal>,
|
This also configures the kernel to pass core dumps to <literal>systemd-coredump</literal>,
|
||||||
and restricts the SysRq key combinations to the sync command only.
|
and restricts the SysRq key combinations to the sync command only.
|
||||||
These sysctl snippets can be found in <literal>/etc/sysctl.d/50-*.conf</literal>,
|
These sysctl snippets can be found in <literal>/etc/sysctl.d/50-*.conf</literal>,
|
||||||
and overridden via <link linkend="opt-boot.kernel.sysctl">boot.kernel.sysctl</link>
|
and overridden via <link linkend="opt-boot.kernel.sysctl">boot.kernel.sysctl</link>
|
||||||
|
@ -748,12 +748,15 @@
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Coredumps are now acquired by <literal>systemd-coredump</literal> by default.
|
Core dumps are now processed by <literal>systemd-coredump</literal>
|
||||||
<literal>systemd-coredump</literal> behaviour can still be modified via
|
by default. <literal>systemd-coredump</literal> behaviour can
|
||||||
<option>systemd.coredump.extraConfig</option>.
|
still be modified via
|
||||||
To stick to the old behaviour (having the kernel dump to a file called <literal>core</literal>
|
<option>systemd.coredump.extraConfig</option>. To stick to the
|
||||||
in the working directory), without piping it through <literal>systemd-coredump</literal>, set
|
old behaviour (having the kernel dump to a file called
|
||||||
<option>boot.kernel.sysctl."kernel.core_pattern"</option> to <literal>"core"</literal>.
|
<literal>core</literal> in the working directory), without piping
|
||||||
|
it through <literal>systemd-coredump</literal>, set
|
||||||
|
<option>systemd.coredump.enable</option> to
|
||||||
|
<literal>false</literal>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
|
@ -233,7 +233,6 @@ with lib;
|
||||||
(mkRemovedOptionModule [ "services" "mysql" "rootPassword" ] "Use socket authentication or set the password outside of the nix store.")
|
(mkRemovedOptionModule [ "services" "mysql" "rootPassword" ] "Use socket authentication or set the password outside of the nix store.")
|
||||||
(mkRemovedOptionModule [ "services" "zabbixServer" "dbPassword" ] "Use services.zabbixServer.database.passwordFile instead.")
|
(mkRemovedOptionModule [ "services" "zabbixServer" "dbPassword" ] "Use services.zabbixServer.database.passwordFile instead.")
|
||||||
(mkRemovedOptionModule [ "systemd" "generator-packages" ] "Use systemd.packages instead.")
|
(mkRemovedOptionModule [ "systemd" "generator-packages" ] "Use systemd.packages instead.")
|
||||||
(mkRemovedOptionModule [ "systemd" "coredump" "enable" ] "Enabled by default. Set boot.kernel.sysctl.\"kernel.core_pattern\" = \"core\"; to disable.")
|
|
||||||
|
|
||||||
# ZSH
|
# ZSH
|
||||||
(mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ])
|
(mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ])
|
||||||
|
|
|
@ -546,6 +546,16 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.coredump.enable = mkOption {
|
||||||
|
default = true;
|
||||||
|
type = types.bool;
|
||||||
|
description = ''
|
||||||
|
Whether core dumps should be processed by
|
||||||
|
<command>systemd-coredump</command>. If disabled, core dumps
|
||||||
|
appear in the current directory of the crashing process.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
systemd.coredump.extraConfig = mkOption {
|
systemd.coredump.extraConfig = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
|
@ -983,6 +993,10 @@ in
|
||||||
# Don't bother with certain units in containers.
|
# Don't bother with certain units in containers.
|
||||||
systemd.services.systemd-remount-fs.unitConfig.ConditionVirtualization = "!container";
|
systemd.services.systemd-remount-fs.unitConfig.ConditionVirtualization = "!container";
|
||||||
systemd.services.systemd-random-seed.unitConfig.ConditionVirtualization = "!container";
|
systemd.services.systemd-random-seed.unitConfig.ConditionVirtualization = "!container";
|
||||||
|
|
||||||
|
boot.kernel.sysctl = mkIf (!cfg.coredump.enable) {
|
||||||
|
"kernel.core_pattern" = "core";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# FIXME: Remove these eventually.
|
# FIXME: Remove these eventually.
|
||||||
|
|
Loading…
Reference in New Issue