{ 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"; }; }; }