aboutsummaryrefslogtreecommitdiff
path: root/src/org/euandre/queue.scm
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-03-17 15:35:26 -0300
committerEuAndreh <eu@euandre.org>2023-03-17 15:35:26 -0300
commit823b92303ad1d311e0ea1bbd915fc12e3cacb1e1 (patch)
tree41ced6bcc662bcc76e79b1a094c0c49e8a2e39bb /src/org/euandre/queue.scm
parentMakefile: Streamline verification of generated config files (diff)
downloadpackage-repository-823b92303ad1d311e0ea1bbd915fc12e3cacb1e1.tar.gz
package-repository-823b92303ad1d311e0ea1bbd915fc12e3cacb1e1.tar.xz
queue.scm: Put Dovecot config file under /etc/dovecot/dovecot.conf by default
Diffstat (limited to 'src/org/euandre/queue.scm')
-rw-r--r--src/org/euandre/queue.scm18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/org/euandre/queue.scm b/src/org/euandre/queue.scm
index c331cdd..fcb65ab 100644
--- a/src/org/euandre/queue.scm
+++ b/src/org/euandre/queue.scm
@@ -1356,7 +1356,8 @@ max_age: 604800
(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"))
+ (config-dirname dovecot-configuration-config-dirname (default "dovecot"))
+ (config-filename dovecot-configuration-config-filename (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"))
@@ -1446,10 +1447,13 @@ namespace inbox {
(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)))))))
+ (raw-file config-dirname config-filename)
+ `((,config-dirname
+ ,(file-union
+ config-dirname
+ `((,config-filename ,(plain-file config-filename
+ (or raw-file
+ (generate-dovecot-config config))))))))))
(define (dovecot-accounts config)
(match-record config <dovecot-configuration>
@@ -1505,8 +1509,8 @@ namespace inbox {
(define (dovecot-shepherd-service config)
(match-record config <dovecot-configuration>
- (dovecot config-name)
- (let ((config-file (string-append "/etc/" config-name)))
+ (dovecot config-dirname config-filename)
+ (let ((config-file (string-append "/etc/" config-dirname "/" config-filename)))
(list
(shepherd-service
(provision '(dovecot))