summary refs log tree commit diff
path: root/gnu/home/services/shells.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/home/services/shells.scm')
-rw-r--r--gnu/home/services/shells.scm25
1 files changed, 1 insertions, 24 deletions
diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm
index 28d717f03d..172e58a9ff 100644
--- a/gnu/home/services/shells.scm
+++ b/gnu/home/services/shells.scm
@@ -111,30 +111,7 @@ service type can be extended with a list of file-like objects.")))
 
 (define (serialize-boolean field-name val) "")
 (define (serialize-posix-env-vars field-name val)
-  #~(let ((shell-quote
-           (lambda (value)
-             ;; Double-quote VALUE, leaving dollar sign as is.
-             (let ((quoted (list->string
-                            (string-fold-right
-                             (lambda (chr lst)
-                               (case chr
-                                 ((#\" #\\)
-                                  (append (list chr #\\) lst))
-                                 (else (cons chr lst))))
-                             '()
-                             value))))
-               (string-append "\"" quoted "\"")))))
-      (string-append
-       #$@(map
-           (match-lambda
-             ((key . #f)
-              "")
-             ((key . #t)
-              #~(string-append "export " #$key "\n"))
-             ((key . value)
-              #~(string-append "export " #$key "="
-                               (shell-quote #$value) "\n")))
-           val))))
+  (environment-variable-shell-definitions val))
 
 
 ;;;