mirror of
https://github.com/ItsDrike/nixdots
synced 2025-06-30 14:00:43 +00:00
Group shared system settings
This commit is contained in:
parent
31221a5d19
commit
fca6296841
35 changed files with 16 additions and 11 deletions
24
system/shared/services/logrotate.nix
Normal file
24
system/shared/services/logrotate.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
services.logrotate.settings.header = {
|
||||
# general
|
||||
global = true;
|
||||
dateext = true;
|
||||
dateformat = "-%Y-%m-%d";
|
||||
nomail = true;
|
||||
missingok = true;
|
||||
copytruncate = true;
|
||||
|
||||
# rotation frequency
|
||||
priority = 1;
|
||||
frequency = "weekly";
|
||||
rotate = 7; # special value, means 7 days
|
||||
minage = 7; # avoid rotating files that are less than 7 days old
|
||||
|
||||
# compression
|
||||
compress = true; # compress logs to save space
|
||||
compresscmd = "${lib.getExe' pkgs.zstd "zstd"}";
|
||||
compressoptions = " -Xcompression-level 10";
|
||||
compressext = "zst";
|
||||
uncompresscmd = "${lib.getExe' pkgs.zstd "unzstd"}";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue