mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-16 00:19:12 +00:00
profiles/server: update journald log retention
Instead of using a service to force it out, we're using the appropriate journald settings instead.
This commit is contained in:
parent
94c94be9a4
commit
d42b74b1e9
@ -161,22 +161,10 @@ in
|
||||
dates = [ "weekly" ];
|
||||
};
|
||||
|
||||
# Journals cleanup every week.
|
||||
systemd.services.cleanup-logs = {
|
||||
description = "Weekly log cleanup";
|
||||
documentation = [ "man:journalctl(1)" ];
|
||||
serviceConfig.ExecStart = "${pkgs.systemd}/bin/journalctl --vacuum-time=30d";
|
||||
};
|
||||
|
||||
systemd.timers.clean-log = {
|
||||
description = "Weekly log cleanup";
|
||||
documentation = [ "man:journalctl(1)" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "monthly";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
# Journal settings for retention.
|
||||
services.journald.extraConfig = ''
|
||||
MaxRetentionSec="3 month"
|
||||
'';
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user