[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#65119] [PATCH 3/8] services: syncthing: Use 'match-record'.
From: |
Ludovic Courtès |
Subject: |
[bug#65119] [PATCH 3/8] services: syncthing: Use 'match-record'. |
Date: |
Sun, 6 Aug 2023 23:07:30 +0200 |
* gnu/services/syncthing.scm (syncthing-shepherd-service): Use
'match-record-lambda' instead of 'match-lambda'.
---
gnu/services/syncthing.scm | 52 +++++++++++++++++++-------------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/gnu/services/syncthing.scm b/gnu/services/syncthing.scm
index 7c3d5b027d..8f94aef088 100644
--- a/gnu/services/syncthing.scm
+++ b/gnu/services/syncthing.scm
@@ -51,32 +51,32 @@ (define-record-type* <syncthing-configuration>
(default #f)))
(define syncthing-shepherd-service
- (match-lambda
- (($ <syncthing-configuration> syncthing arguments logflags user group home)
- (list
- (shepherd-service
- (provision (list (string->symbol (string-append "syncthing-" user))))
- (documentation "Run syncthing.")
- (requirement '(loopback))
- (start #~(make-forkexec-constructor
- (append (list (string-append #$syncthing "/bin/syncthing")
- "-no-browser"
- "-no-restart"
- (string-append "-logflags=" (number->string
#$logflags)))
- '#$arguments)
- #:user #$user
- #:group #$group
- #:environment-variables
- (append (list (string-append "HOME=" (or #$home (passwd:dir
(getpw #$user))))
- "SSL_CERT_DIR=/etc/ssl/certs"
-
"SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt")
- (remove (lambda (str)
- (or (string-prefix? "HOME=" str)
- (string-prefix? "SSL_CERT_DIR=" str)
- (string-prefix? "SSL_CERT_FILE=" str)))
- (environ)))))
- (respawn? #f)
- (stop #~(make-kill-destructor)))))))
+ (match-record-lambda <syncthing-configuration>
+ (syncthing arguments logflags user group home)
+ (list
+ (shepherd-service
+ (provision (list (string->symbol (string-append "syncthing-" user))))
+ (documentation "Run syncthing.")
+ (requirement '(loopback))
+ (start #~(make-forkexec-constructor
+ (append (list (string-append #$syncthing "/bin/syncthing")
+ "-no-browser"
+ "-no-restart"
+ (string-append "-logflags=" (number->string
#$logflags)))
+ '#$arguments)
+ #:user #$user
+ #:group #$group
+ #:environment-variables
+ (append (list (string-append "HOME=" (or #$home (passwd:dir
(getpw #$user))))
+ "SSL_CERT_DIR=/etc/ssl/certs"
+
"SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt")
+ (remove (lambda (str)
+ (or (string-prefix? "HOME=" str)
+ (string-prefix? "SSL_CERT_DIR=" str)
+ (string-prefix? "SSL_CERT_FILE=" str)))
+ (environ)))))
+ (respawn? #f)
+ (stop #~(make-kill-destructor))))))
(define syncthing-service-type
(service-type (name 'syncthing)
--
2.41.0
- [bug#65119] [PATCH 0/8] Sharing service code between Home and System, Ludovic Courtès, 2023/08/06
- [bug#65119] [PATCH 1/8] services: dicod: Remove Shepherd < 0.9.0 compatibility layer., Ludovic Courtès, 2023/08/06
- [bug#65119] [PATCH 2/8] services: dicod: Pre-build the GCIDE index., Ludovic Courtès, 2023/08/06
- [bug#65119] [PATCH 3/8] services: syncthing: Use 'match-record'.,
Ludovic Courtès <=
- [bug#65119] [PATCH 4/8] services: Define 'for-home'., Ludovic Courtès, 2023/08/06
- [bug#65119] [PATCH 5/8] home: services: Support mapping of System services to Home services., Ludovic Courtès, 2023/08/06
- [bug#65119] [PATCH 7/8] home: services: Add dicod., Ludovic Courtès, 2023/08/06
- [bug#65119] [PATCH 8/8] home: services: Add Syncthing., Ludovic Courtès, 2023/08/06
- [bug#65119] [PATCH 6/8] home: services: mcron: Define as a mapping of the system service., Ludovic Courtès, 2023/08/06
- [bug#65119] [PATCH 0/8] Sharing service code between Home and System, 宋文武, 2023/08/13