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:
Gabriel Arazas 2023-06-28 14:01:48 +08:00
parent 94c94be9a4
commit d42b74b1e9
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -161,22 +161,10 @@ in
dates = [ "weekly" ]; dates = [ "weekly" ];
}; };
# Journals cleanup every week. # Journal settings for retention.
systemd.services.cleanup-logs = { services.journald.extraConfig = ''
description = "Weekly log cleanup"; MaxRetentionSec="3 month"
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;
};
};
}) })
]); ]);
} }