nixos/modules/system/systemd.nix

20 lines
601 B
Nix
Raw Permalink Normal View History

2023-09-02 21:39:01 +08:00
inputs: { config =
{
# only preserve the last 7 days of logs
services.journald.extraConfig = "MaxRetentionSec=7d";
systemd =
{
extraConfig =
''
DefaultTimeoutStopSec=10s
DefaultLimitNOFILE=1048576:1048576
'';
user.extraConfig = "DefaultTimeoutStopSec=10s";
# do not create /var/lib/machines and /var/lib/portables as subvolumes
services.systemd-tmpfiles-setup.environment.SYSTEMD_TMPFILES_FORCE_SUBVOL = "0";
# do not clean /tmp
timers.systemd-tmpfiles-clean.enable = false;
2023-09-09 00:40:25 +08:00
coredump = { enable = true; extraConfig = "Storage=none"; };
2023-09-02 21:39:01 +08:00
};
};}