mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-19 18: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" ];
|
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user