Fix string coercion issue with clean-audit-log

This commit is contained in:
ItsDrike 2024-04-16 12:13:42 +02:00
parent 76a8640246
commit d765db5332
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0

View file

@ -35,7 +35,7 @@ in {
services."clean-audit-log" = {
script = ''
set -eu
if [[ $(stat -c "%s" /var/log/audit/audit.log) -gt ${cfg.autoPrune.size} ]]; then
if [[ $(stat -c "%s" /var/log/audit/audit.log) -gt ${builtins.toString cfg.autoPrune.size} ]]; then
echo "Clearing Audit Log";
rm -rvf /var/log/audit/audit.log;
echo "Done!"