diff options
author | EuAndreh <eu@euandre.org> | 2023-03-17 07:09:29 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-03-17 07:11:00 -0300 |
commit | 4283730e168021d4a6d437b2c723567b3b3f4eef (patch) | |
tree | 7b1a8aa3fff7375780641580efed3a19e214e190 /src/org/euandre/queue.scm | |
parent | Test for expected output of Postfix config files (diff) | |
download | package-repository-4283730e168021d4a6d437b2c723567b3b3f4eef.tar.gz package-repository-4283730e168021d4a6d437b2c723567b3b3f4eef.tar.xz |
queue.scm: Rename dovecot2* => dovecot
Diffstat (limited to 'src/org/euandre/queue.scm')
-rw-r--r-- | src/org/euandre/queue.scm | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/src/org/euandre/queue.scm b/src/org/euandre/queue.scm index 9ec21ef..5175ec2 100644 --- a/src/org/euandre/queue.scm +++ b/src/org/euandre/queue.scm @@ -148,8 +148,8 @@ internet-postfix-service-type - dovecot2-service-type - dovecot2-configuration)) + dovecot-service-type + dovecot-configuration)) @@ -1331,26 +1331,26 @@ max_age: 604800 -(define-record-type* <dovecot2-configuration> - dovecot2-configuration - make-dovecot2-configuration - dovecot2-configuration? - (dovecot2 dovecot2-configuration-dovecot2 (default dovecot)) - (mail-in-home? dovecot2-configuration-mail-in-home? (default #f)) - (raw-file dovecot2-configuration-raw-file (default #f)) - (extra-content dovecot2-configuration-extra-content (default "")) - (config-name dovecot2-configuration-config-name (default "dovecot2.conf")) - (user dovecot2-configuration-user (default "dovecot2")) - (group dovecot2-configuration-group (default "dovecot2")) - (auth-worker-group dovecot2-configuration-auth-worker-group (default "etc-shadow")) - (untrusted-user dovecot2-configuration-untrusted-user (default "dovenull2")) - (untrusted-group dovecot2-configuration-untrusted-group (default "dovenull2")) - (base-dir dovecot2-configuration-base-dir (default "/var/run/dovecot2")) - (state-dir dovecot2-configuration-state-dir (default "/var/lib/dovecot2")) - (hostname dovecot2-configuration-hostname (default (gethostname)))) +(define-record-type* <dovecot-configuration> + dovecot-configuration + make-dovecot-configuration + dovecot-configuration? + (dovecot dovecot-configuration-dovecot (default dovecot)) + (mail-in-home? dovecot-configuration-mail-in-home? (default #f)) + (raw-file dovecot-configuration-raw-file (default #f)) + (extra-content dovecot-configuration-extra-content (default "")) + (config-name dovecot-configuration-config-name (default "dovecot.conf")) + (user dovecot-configuration-user (default "dovecot")) + (group dovecot-configuration-group (default "dovecot")) + (auth-worker-group dovecot-configuration-auth-worker-group (default "etc-shadow")) + (untrusted-user dovecot-configuration-untrusted-user (default "dovenull")) + (untrusted-group dovecot-configuration-untrusted-group (default "dovenull")) + (base-dir dovecot-configuration-base-dir (default "/var/run/dovecot")) + (state-dir dovecot-configuration-state-dir (default "/var/lib/dovecot")) + (hostname dovecot-configuration-hostname (default (gethostname)))) (define (generate-dovecot-config config) - (match-record config <dovecot2-configuration> + (match-record config <dovecot-configuration> (mail-in-home? user group auth-worker-group untrusted-user hostname base-dir state-dir extra-content) (format #f @@ -1431,15 +1431,15 @@ namespace inbox { extra-content))) -(define (dovecot2-etc-files config) - (match-record config <dovecot2-configuration> +(define (dovecot-etc-files config) + (match-record config <dovecot-configuration> (raw-file config-name) `((,config-name ,(plain-file config-name (or raw-file (generate-dovecot-config config))))))) -(define (dovecot2-accounts config) - (match-record config <dovecot2-configuration> +(define (dovecot-accounts config) + (match-record config <dovecot-configuration> (user group untrusted-user untrusted-group) (list (user-account @@ -1467,8 +1467,8 @@ namespace inbox { (name untrusted-group) (system? #t))))) -(define (dovecot2-activation config) - (match-record config <dovecot2-configuration> +(define (dovecot-activation config) + (match-record config <dovecot-configuration> (base-dir state-dir) #~(begin (use-modules (guix build utils)) @@ -1490,17 +1490,17 @@ namespace inbox { (format (current-error-port) "Failed to create dhparam.pem file: \"~a\".~%" dhparam.pem))))))))) -(define (dovecot2-shepherd-service config) - (match-record config <dovecot2-configuration> - (dovecot2 config-name) +(define (dovecot-shepherd-service config) + (match-record config <dovecot-configuration> + (dovecot config-name) (let ((config-file (string-append "/etc/" config-name))) (list (shepherd-service - (provision '(dovecot2)) - (documentation "FIXME:DOCUMENTATION: heredoc syntax") + (provision '(dovecot)) + (documentation "") (start #~(make-forkexec-constructor (list - #$(file-append dovecot2 "/sbin/dovecot") + #$(file-append dovecot "/sbin/dovecot") "-F" "-c" #$config-file))) @@ -1523,23 +1523,23 @@ namespace inbox { #$config-file "reload"))))))))))) -(define dovecot2-service-type +(define dovecot-service-type (service-type - (name 'dovecot2) + (name 'dovecot) (extensions (list (service-extension etc-service-type - dovecot2-etc-files) + dovecot-etc-files) (service-extension account-service-type - dovecot2-accounts) + dovecot-accounts) (service-extension activation-service-type - dovecot2-activation) + dovecot-activation) (service-extension profile-service-type - (compose list dovecot2-configuration-dovecot2)) + (compose list dovecot-configuration-dovecot)) (service-extension shepherd-root-service-type - dovecot2-shepherd-service))) - (default-value (dovecot2-configuration)) - (description "FIXME:DOCUMENTATION: heredoc syntax"))) + dovecot-shepherd-service))) + (default-value (dovecot-configuration)) + (description ""))) ;; FIXME ;; automate personal server with: |