diff options
author | Ludovic Courtès <ludo@gnu.org> | 2023-08-06 12:26:06 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-08-20 22:48:39 +0200 |
commit | c6c8106c65bc1edcbb67e4ccfdc81c01aa4afd5f (patch) | |
tree | 473ed224efe0d03acfaff00988cb1f9414c957aa | |
parent | 9bfe7fbdbe51451d74a8fead5c1727d002050a52 (diff) | |
download | guix-c6c8106c65bc1edcbb67e4ccfdc81c01aa4afd5f.tar.gz |
services: syncthing: Use 'match-record'.
* gnu/services/syncthing.scm (syncthing-shepherd-service): Use 'match-record-lambda' instead of 'match-lambda'.
-rw-r--r-- | gnu/services/syncthing.scm | 52 |
1 files 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) |