aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Makefile14
-rw-r--r--src/org/euandre/queue.scm18
-rw-r--r--tests/internet/etc/dovecot/dovecot.conf.in (renamed from tests/internet/etc/dovecot.conf.in)0
4 files changed, 19 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index 0275198..4eeb4ff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
/result*
/tests/internet/etc/postfix/main.cf
/tests/internet/etc/dkimproxyout.conf
-/tests/internet/etc/dovecot.conf
+/tests/internet/etc/dovecot/dovecot.conf
diff --git a/Makefile b/Makefile
index 6ec9c2e..cedd84e 100644
--- a/Makefile
+++ b/Makefile
@@ -16,9 +16,9 @@ all: EuAndreh.key guix nix
test-config-files = \
- tests/internet/etc/postfix/main.cf \
- tests/internet/etc/dkimproxyout.conf \
- tests/internet/etc/dovecot.conf \
+ tests/internet/etc/postfix/main.cf \
+ tests/internet/etc/dkimproxyout.conf \
+ tests/internet/etc/dovecot/dovecot.conf \
derived-assets = \
$(test-config-files) \
@@ -35,10 +35,10 @@ local-files = \
/etc/postfix/main.cf \
internet-files = \
- $(local-files) \
- /etc/sasl2/smtpd.conf \
- /etc/dkimproxyout.conf \
- /etc/dovecot.conf \
+ $(local-files) \
+ /etc/sasl2/smtpd.conf \
+ /etc/dkimproxyout.conf \
+ /etc/dovecot/dovecot.conf \
guix-services-local:
rm -f result-local
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))
diff --git a/tests/internet/etc/dovecot.conf.in b/tests/internet/etc/dovecot/dovecot.conf.in
index 6ac013d..6ac013d 100644
--- a/tests/internet/etc/dovecot.conf.in
+++ b/tests/internet/etc/dovecot/dovecot.conf.in