modularized traefik log rotatation config

This commit is contained in:
2026-07-13 01:05:44 +10:00
parent 3d42dee0bf
commit da75a23700
2 changed files with 35 additions and 14 deletions
+15 -14
View File
@@ -25,6 +25,7 @@ in
../../modules/docker/enable-service.nix ../../modules/docker/enable-service.nix
# ../../modules/nix/tailscale-service.nix # ../../modules/nix/tailscale-service.nix
../../modules/tailscale/enable-service.nix ../../modules/tailscale/enable-service.nix
../../modules/rotate-traefik-logs.nix
]; ];
@@ -39,22 +40,22 @@ boot.zfs.forceImportRoot = false;
nfs-utils nfs-utils
]; ];
services.logrotate = { # services.logrotate = {
enable = true; # enable = true;
settings = { # settings = {
"/mnt/docker-volumes/traefik-data/logs/*.log" = { # "/mnt/docker-volumes/traefik-data/logs/*.log" = {
daily = true; # daily = true;
size = "100M"; # size = "100M";
rotate = 20; # rotate = 20;
compress = true; # compress = true;
missingok = true; # missingok = true;
notifempty = true; # notifempty = true;
copytruncate = true; # copytruncate = true;
}; # };
}; # };
}; # };
boot.supportedFilesystems = [ "nfs" ]; boot.supportedFilesystems = [ "nfs" ];
+20
View File
@@ -0,0 +1,20 @@
{ ... }:
{
services.logrotate = {
enable = true;
settings = {
"/mnt/docker-volumes/traefik-data/logs/*.log" = {
daily = true;
size = "100M";
rotate = 20;
compress = true;
missingok = true;
notifempty = true;
copytruncate = true;
};
};
};
}