nixos/logrotate: convert to freeform
using freeform is the new standard way of using modules and should replace extraConfig. In particular, this will allow us to place a condition on mails
This commit is contained in:
@@ -51,18 +51,14 @@ in
|
||||
|
||||
environment.etc."lxd-image-server/config.toml".source = format.generate "config.toml" cfg.settings;
|
||||
|
||||
services.logrotate.paths.lxd-image-server = {
|
||||
path = "/var/log/lxd-image-server/lxd-image-server.log";
|
||||
services.logrotate.settings.lxd-image-server = {
|
||||
files = "/var/log/lxd-image-server/lxd-image-server.log";
|
||||
frequency = "daily";
|
||||
keep = 21;
|
||||
extraConfig = ''
|
||||
create 755 lxd-image-server ${cfg.group}
|
||||
missingok
|
||||
compress
|
||||
delaycompress
|
||||
copytruncate
|
||||
notifempty
|
||||
'';
|
||||
rotate = 21;
|
||||
create = "755 lxd-image-server ${cfg.group}";
|
||||
compress = true;
|
||||
delaycompress = true;
|
||||
copytruncate = true;
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
|
||||
Reference in New Issue
Block a user