diff options
| author | Fuwn <[email protected]> | 2024-09-13 09:38:45 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-13 09:38:45 -0700 |
| commit | eeb6c4c05429b80250de9a2286effa5efeb3ec27 (patch) | |
| tree | 674b7d9994179c3be39d7a944f2e1f0a85b816cb | |
| parent | modules: gpm service (diff) | |
| download | nixos-config-eeb6c4c05429b80250de9a2286effa5efeb3ec27.tar.xz nixos-config-eeb6c4c05429b80250de9a2286effa5efeb3ec27.zip | |
modules: logrotate
| -rw-r--r-- | modules/software/services/default.nix | 1 | ||||
| -rw-r--r-- | modules/software/services/logrotate.nix | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/modules/software/services/default.nix b/modules/software/services/default.nix index aee381c..4b9ccf6 100644 --- a/modules/software/services/default.nix +++ b/modules/software/services/default.nix @@ -5,6 +5,7 @@ ./ananicy.nix ./dbus.nix ./libinput.nix + ./logrotate.nix ./ollama.nix # ./printing.nix ./xserver.nix diff --git a/modules/software/services/logrotate.nix b/modules/software/services/logrotate.nix new file mode 100644 index 0000000..2dedf2e --- /dev/null +++ b/modules/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"}"; + }; + }; +} |