diff options
-rw-r--r-- | custom/ymir-nginx.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/custom/ymir-nginx.nix b/custom/ymir-nginx.nix index 16d48d16..e5b2f162 100644 --- a/custom/ymir-nginx.nix +++ b/custom/ymir-nginx.nix | |||
@@ -29,6 +29,20 @@ let | |||
29 | } | 29 | } |
30 | ''; | 30 | ''; |
31 | in { | 31 | in { |
32 | services.logrotate = { | ||
33 | enable = true; | ||
34 | config = '' | ||
35 | /var/spool/nginx/logs/* { | ||
36 | compress | ||
37 | daily | ||
38 | missingok | ||
39 | rotate 4 | ||
40 | size 1M | ||
41 | su ${services.nginx.user} ${services.nginx.group} | ||
42 | } | ||
43 | ''; | ||
44 | }; | ||
45 | |||
32 | services.nginx = { | 46 | services.nginx = { |
33 | enable = true; | 47 | enable = true; |
34 | httpConfig = '' | 48 | httpConfig = '' |