~ruther/guix-local

a1d367d6ee8c1783ef94cebbc5f2ae3b7a08078d — Sergio Pastor Pérez 2 years ago 0b65a43
services: syncthing: incorrect guessing of HOME variable

Fixed the issue described here:
https://lists.gnu.org/archive/html/help-guix/2024-01/msg00034.html

Fix `syncthing-shepherd-service` failing to guess the correct `HOME`
environment variable when it's `<syncthing-configuration>` does not have a
value for the `home` or `user` fields.

* gnu/services/syncthing.scm (syncthing-shepherd-service): Change ‘HOME’
value in #:environment-variables argument.

Change-Id: I102bfe5feba1ebb349a0cde1c987c0c10ebbab7a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
1 files changed, 9 insertions(+), 1 deletions(-)

M gnu/services/syncthing.scm
M gnu/services/syncthing.scm => gnu/services/syncthing.scm +9 -1
@@ 73,7 73,15 @@
                #:user #$(and (not home-service?) user)
                #:group #$(and (not home-service?) group)
                #:environment-variables
                (append (list (string-append "HOME=" (or #$home (passwd:dir (getpw #$user))))
                (append
                 (list
                  (string-append "HOME="
                                 (or #$home
                                     (passwd:dir
                                      (getpw (if (and #$home-service?
                                                      (not #$user))
                                                 (getuid)
                                                 #$user)))))
                              "SSL_CERT_DIR=/etc/ssl/certs"
                              "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt")
                        (filter (negate       ;XXX: 'remove' is not in (guile)