[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/14: services: syncthing: Use 'match-record'.
From: |
guix-commits |
Subject: |
03/14: services: syncthing: Use 'match-record'. |
Date: |
Sun, 20 Aug 2023 17:22:25 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit c6c8106c65bc1edcbb67e4ccfdc81c01aa4afd5f
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Aug 6 12:26:06 2023 +0200
services: syncthing: Use 'match-record'.
* 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 c1a0cdd81f..e03e8e40b6 100644
--- a/gnu/services/syncthing.scm
+++ b/gnu/services/syncthing.scm
@@ -52,32 +52,32 @@
(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)
- branch master updated (78748c619a -> a0f5885fef), guix-commits, 2023/08/20
- 02/14: services: dicod: Pre-build the GCIDE index., guix-commits, 2023/08/20
- 04/14: services: Define 'for-home'., guix-commits, 2023/08/20
- 01/14: services: dicod: Remove Shepherd < 0.9.0 compatibility layer., guix-commits, 2023/08/20
- 06/14: home: services: mcron: Define as a mapping of the system service., guix-commits, 2023/08/20
- 08/14: home: services: Add Syncthing., guix-commits, 2023/08/20
- 09/14: home: services: ssh: Fix compilation warning with 'serialize-match-criteria'., guix-commits, 2023/08/20
- 11/14: gnu: Add python-ffmpeg-python., guix-commits, 2023/08/20
- 13/14: gnu: lttng-ust: Update to 2.13.6., guix-commits, 2023/08/20
- 14/14: doc: Fix module for "Essential Home Services"., guix-commits, 2023/08/20
- 03/14: services: syncthing: Use 'match-record'.,
guix-commits <=
- 05/14: home: services: Support mapping of System services to Home services., guix-commits, 2023/08/20
- 07/14: home: services: Add dicod., guix-commits, 2023/08/20
- 10/14: gnu: Add bfs., guix-commits, 2023/08/20
- 12/14: gnu: Add r128gain., guix-commits, 2023/08/20