Files to symlink are located inside `GUIX_PACKAGE_PATH`. Specifying
this variable every time is redundant. This commit hides the lookup.
#:export (home-symlink-service-type))
(define (symlink paths)
+ (define (conf-home file)
+ (string-concatenate
+ (list (getenv "GUIX_PACKAGE_PATH") "/" file)))
+
(define (make-symlink-pair path)
- (let ((file (local-file path))
- (first-slash (string-index path #\/)))
+ (let* ((conf-path (conf-home path))
+ (file (local-file conf-path #:recursive? #t))
+ (first-slash (string-index path #\/)))
(if first-slash
(list (substring path (+ first-slash 1))
file)