logrotate: add services.logrotate.settings example

This commit is contained in:
Dominique Martinet 2022-06-13 07:36:08 +09:00
parent 01ff1dd23f
commit 665d896244

View file

@ -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 ]));