mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
nixos/systemd: enable systemd-pstore.service
As described in issue #81138, the Install section of upstream units is currently ignored, so we make it part of the sysinit.target manually.
This commit is contained in:
parent
870fa77ff6
commit
3e3e763a07
@ -1035,6 +1035,12 @@ environment.systemPackages = [
|
||||
</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The newly enabled <literal>systemd-pstore.service</literal> now automatically evacuates crashdumps and panic logs from the persistent storage to <literal>/var/lib/systemd/pstore</literal>.
|
||||
This prevents NVRAM from filling up, which ensures the latest diagnostic data is always stored and alleviates problems with writing new boot configurations.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
|
@ -99,5 +99,13 @@ with lib;
|
||||
# because we have the firewall enabled. This makes installs from the
|
||||
# console less cumbersome if the machine has a public IP.
|
||||
networking.firewall.logRefusedConnections = mkDefault false;
|
||||
|
||||
# Prevent installation media from evacuating persistent storage, as their
|
||||
# var directory is not persistent and it would thus result in deletion of
|
||||
# those entries.
|
||||
environment.etc."systemd/pstore.conf".text = ''
|
||||
[PStore]
|
||||
Unlink=no
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -90,6 +90,7 @@ let
|
||||
"systemd-fsck@.service"
|
||||
"systemd-fsck-root.service"
|
||||
"systemd-remount-fs.service"
|
||||
"systemd-pstore.service"
|
||||
"local-fs.target"
|
||||
"local-fs-pre.target"
|
||||
"remote-fs.target"
|
||||
@ -1183,6 +1184,7 @@ in
|
||||
systemd.targets.remote-fs.unitConfig.X-StopOnReconfiguration = true;
|
||||
systemd.targets.network-online.wantedBy = [ "multi-user.target" ];
|
||||
systemd.services.systemd-importd.environment = proxy_env;
|
||||
systemd.services.systemd-pstore.wantedBy = [ "sysinit.target" ]; # see #81138
|
||||
|
||||
# Don't bother with certain units in containers.
|
||||
systemd.services.systemd-remount-fs.unitConfig.ConditionVirtualization = "!container";
|
||||
|
Loading…
Reference in New Issue
Block a user