21 lines
491 B
Nix
21 lines
491 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
boot.kernelPackages = pkgs.linuxPackages_latest_hardened;
|
|
|
|
systemd = {
|
|
services.clear-log = {
|
|
description = "Clear >1 month-old logs every week";
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
ExecStart = "${pkgs.systemd}/bin/journalctl --vacuum-time=30d";
|
|
};
|
|
};
|
|
timers.clear-log = {
|
|
wantedBy = [ "timers.target" ];
|
|
partOf = [ "clear-log.service" ];
|
|
timerConfig.OnCalendar = "weekly UTC";
|
|
};
|
|
};
|
|
}
|