summaryrefslogtreecommitdiff
path: root/modules/pc/software/services/logrotate.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pc/software/services/logrotate.nix')
-rw-r--r--modules/pc/software/services/logrotate.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/pc/software/services/logrotate.nix b/modules/pc/software/services/logrotate.nix
new file mode 100644
index 0000000..2dedf2e
--- /dev/null
+++ b/modules/pc/software/services/logrotate.nix
@@ -0,0 +1,24 @@
+{ pkgs, lib, ... }:
+{
+ services.logrotate.settings = {
+ "/var/log/audit/audit.log" = { };
+
+ header = {
+ global = true;
+ dateext = true;
+ dateformat = "-%Y-%m-%d";
+ nomail = true;
+ missingok = true;
+ copytruncate = true;
+ priority = 1;
+ frequency = "daily";
+ rotate = 7;
+ minage = 1;
+ compress = true;
+ compresscmd = "${lib.getExe' pkgs.zstd "zstd"}";
+ compressoptions = " -Xcompression-level 10";
+ compressext = "zst";
+ uncompresscmd = "${lib.getExe' pkgs.zstd "unzstd"}";
+ };
+ };
+}