diff --git a/gnu/services/syncthing.scm b/gnu/services/syncthing.scm index 9bb623186b..a7a9c6aadd 100644 --- a/gnu/services/syncthing.scm +++ b/gnu/services/syncthing.scm @@ -73,7 +73,15 @@ (define syncthing-shepherd-service #: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)