Update rotation after rottlog is removed
modules/config/os.scm
| 65 | 65 | `(("tyreunom" ,(local-file "../../keys/tyreunom.pub")))))) | |
| 66 | 66 | (simple-service 'motd-service etc-service-type | |
| 67 | 67 | `(("motd" ,(local-file (string-append "motd/" host-name))))) | |
| 68 | + | (simple-service 'my-rotations log-rotation-service-type | |
| 69 | + | server-rotations) | |
| 68 | 70 | (modify-services %base-services | |
| 69 | - | (rottlog-service-type config => | |
| 70 | - | server-rotation-service-config) | |
| 71 | 71 | (login-service-type config => | |
| 72 | 72 | (login-configuration | |
| 73 | 73 | (inherit config) | |
… | |||
| 87 | 87 | (platforms (lookup-qemu-platforms "arm" "aarch64" "i686" "ppc")))) | |
| 88 | 88 | (udev-rules-service 'android android-udev-rules #:groups '("adbusers")) | |
| 89 | 89 | (modify-services %desktop-services | |
| 90 | - | (rottlog-service-type config => | |
| 91 | - | desktop-rotation-service-config) | |
| 92 | 90 | (gdm-service-type config => | |
| 93 | 91 | (gdm-configuration | |
| 94 | 92 | (inherit config) | |
modules/config/rotation.scm
| 22 | 22 | (define-module (config rotation) | |
| 23 | 23 | #:use-module (gnu services) | |
| 24 | 24 | #:use-module (gnu services admin) | |
| 25 | - | #:export (server-rotation-service-config | |
| 26 | - | desktop-rotation-service-config)) | |
| 25 | + | #:export (server-rotations | |
| 26 | + | base-rotations)) | |
| 27 | 27 | ||
| 28 | 28 | (define base-rotations | |
| 29 | - | (list | |
| 30 | - | (log-rotation | |
| 31 | - | ;; What about /var/log/guix? | |
| 32 | - | (files '("/var/log/guix-daemon.log")) | |
| 33 | - | (frequency 'daily) | |
| 34 | - | (options '("rotate 1" "log_rotate"))) | |
| 35 | - | (log-rotation | |
| 36 | - | (files '("/var/log/mcron.log")) | |
| 37 | - | (frequency 'weekly) | |
| 38 | - | (options '("rotate 2" "log_rotate"))) | |
| 39 | - | (log-rotation | |
| 40 | - | (files | |
| 41 | - | (map | |
| 42 | - | (lambda (<>) (string-append "/var/log/" <>)) | |
| 43 | - | '("debug" "lastlog" "messages" "secure" "wtmp"))) | |
| 44 | - | (frequency 'weekly) | |
| 45 | - | (options '("rotate 4" "log_rotate"))) | |
| 46 | - | (log-rotation | |
| 47 | - | (files '("/var/log/shepherd.log")) | |
| 48 | - | (frequency 'daily) | |
| 49 | - | (options '("rotate 1" "log_rotate"))))) | |
| 29 | + | (list "/var/log/guix-daemon.log" | |
| 30 | + | "/var/log/mcron.log" | |
| 31 | + | "/var/log/debug" | |
| 32 | + | "/var/log/lastlog" | |
| 33 | + | "/var/log/messages" | |
| 34 | + | "/var/log/secure" | |
| 35 | + | "/var/log/wtmp" | |
| 36 | + | "/var/log/shepherd.log")) | |
| 50 | 37 | ||
| 51 | - | (define server-rotation-service-config | |
| 52 | - | (rottlog-configuration | |
| 53 | - | (rotations | |
| 54 | - | (append | |
| 55 | - | (list | |
| 56 | - | (log-rotation | |
| 57 | - | (files '("/var/log/letsencrypt/letsencrypt.log")) | |
| 58 | - | (frequency 'daily) | |
| 59 | - | (options '("rotate 30" "log_rotate" "nocompress"))) | |
| 60 | - | (log-rotation | |
| 61 | - | (files '("/var/log/maillog")) | |
| 62 | - | (options '("rotate 5" "log_rotate")) | |
| 63 | - | (frequency 'daily)) | |
| 64 | - | (log-rotation | |
| 65 | - | (files '("/var/log/nginx/access.log" "/var/log/nginx/error.log")) | |
| 66 | - | (frequency 'weekly) | |
| 67 | - | (options '("rotate 1" "log_rotate" "nocompress")))) | |
| 68 | - | base-rotations)))) | |
| 69 | - | ||
| 70 | - | (define desktop-rotation-service-config | |
| 71 | - | (rottlog-configuration | |
| 72 | - | (rotations base-rotations))) | |
| 38 | + | (define server-rotations | |
| 39 | + | (append | |
| 40 | + | base-rotations | |
| 41 | + | (list | |
| 42 | + | "/var/log/letsencrypt/letsencrypt.log" | |
| 43 | + | "/var/log/maillog" | |
| 44 | + | "/var/log/nginx/access.log" | |
| 45 | + | "/var/log/nginx/error.log"))) |