services: Make exim-service-type use mail-aliases-service-type
* gnu/services/mail.scm (exim-configuration)[aliases]: Remove field. (exim-activation, exim-shepherd-service): Remove alias from matches. (exim-etc): Remove procedure. (exim-service-type): Extend mail-aliases-service-type instead of etc-service-type. Signed-off-by: Ludovic Courtès <ludo@gnu.org>master
parent
8d17cf1c2f
commit
b065f78e94
|
@ -1699,9 +1699,7 @@ accept from local for any relay
|
||||||
(package exim-configuration-package ;<package>
|
(package exim-configuration-package ;<package>
|
||||||
(default exim))
|
(default exim))
|
||||||
(config-file exim-configuration-config-file ;file-like
|
(config-file exim-configuration-config-file ;file-like
|
||||||
(default #f))
|
(default #f)))
|
||||||
(aliases exim-configuration-aliases ;; list of lists
|
|
||||||
(default '())))
|
|
||||||
|
|
||||||
(define %exim-accounts
|
(define %exim-accounts
|
||||||
(list (user-group
|
(list (user-group
|
||||||
|
@ -1728,7 +1726,7 @@ exim_group = exim
|
||||||
|
|
||||||
(define exim-shepherd-service
|
(define exim-shepherd-service
|
||||||
(match-lambda
|
(match-lambda
|
||||||
(($ <exim-configuration> package config-file aliases)
|
(($ <exim-configuration> package config-file)
|
||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(provision '(exim mta))
|
(provision '(exim mta))
|
||||||
(documentation "Run the exim daemon.")
|
(documentation "Run the exim daemon.")
|
||||||
|
@ -1741,7 +1739,7 @@ exim_group = exim
|
||||||
|
|
||||||
(define exim-activation
|
(define exim-activation
|
||||||
(match-lambda
|
(match-lambda
|
||||||
(($ <exim-configuration> package config-file aliases)
|
(($ <exim-configuration> package config-file)
|
||||||
(with-imported-modules '((guix build utils))
|
(with-imported-modules '((guix build utils))
|
||||||
#~(begin
|
#~(begin
|
||||||
(use-modules (guix build utils))
|
(use-modules (guix build utils))
|
||||||
|
@ -1754,20 +1752,6 @@ exim_group = exim
|
||||||
(zero? (system* #$(file-append package "/bin/exim")
|
(zero? (system* #$(file-append package "/bin/exim")
|
||||||
"-bV" "-C" #$(exim-computed-config-file package config-file))))))))
|
"-bV" "-C" #$(exim-computed-config-file package config-file))))))))
|
||||||
|
|
||||||
(define exim-etc
|
|
||||||
(match-lambda
|
|
||||||
(($ <exim-configuration> package config-file aliases)
|
|
||||||
`(("aliases" ,(plain-file "aliases"
|
|
||||||
;; Ideally we'd use a format string like
|
|
||||||
;; "~:{~a: ~{~a~^,~}\n~}", but it gives a
|
|
||||||
;; warning that I can't figure out how to fix,
|
|
||||||
;; so we'll just use string-join below instead.
|
|
||||||
(format #f "~:{~a: ~a\n~}"
|
|
||||||
(map (lambda (entry)
|
|
||||||
(list (car entry)
|
|
||||||
(string-join (cdr entry) ",")))
|
|
||||||
aliases))))))))
|
|
||||||
|
|
||||||
(define exim-profile
|
(define exim-profile
|
||||||
(compose list exim-configuration-package))
|
(compose list exim-configuration-package))
|
||||||
|
|
||||||
|
@ -1779,4 +1763,4 @@ exim_group = exim
|
||||||
(service-extension account-service-type (const %exim-accounts))
|
(service-extension account-service-type (const %exim-accounts))
|
||||||
(service-extension activation-service-type exim-activation)
|
(service-extension activation-service-type exim-activation)
|
||||||
(service-extension profile-service-type exim-profile)
|
(service-extension profile-service-type exim-profile)
|
||||||
(service-extension etc-service-type exim-etc)))))
|
(service-extension mail-aliases-service-type (const '()))))))
|
||||||
|
|
Loading…
Reference in New Issue