logrotate: add services.logrotate.settings example
This commit is contained in:
parent
01ff1dd23f
commit
665d896244
1 changed files with 19 additions and 0 deletions
|
@ -109,6 +109,25 @@ in
|
|||
or settings common to all further files settings.
|
||||
Refer to <https://linux.die.net/man/8/logrotate> for details.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
{
|
||||
# global options
|
||||
header = {
|
||||
dateext = true;
|
||||
};
|
||||
# example custom files
|
||||
"/var/log/mylog.log" = {
|
||||
frequency = "daily";
|
||||
rotate = 3;
|
||||
};
|
||||
"multiple paths" = {
|
||||
files = [
|
||||
"/var/log/first*.log"
|
||||
"/var/log/second.log"
|
||||
];
|
||||
};
|
||||
};
|
||||
'';
|
||||
type = types.attrsOf (types.submodule ({ name, ... }: {
|
||||
freeformType = with types; attrsOf (nullOr (oneOf [ int bool str ]));
|
||||
|
||||
|
|
Loading…
Reference in a new issue