home: services: Build "files" union allowing dangling symlinks.

* gnu/home/services.scm (files->files-directory): Build file union
without checking for existence of included items.

* tests/guix-home.sh: Verify symlinking files out of store works.

Change-Id: I94054003f4a6be944252ce7a397cf56f0b979554
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
Sergey Trofimov 2025-05-19 11:50:10 +02:00 committed by Maxim Cournoyer
parent b989e503ac
commit 11bc17c409
No known key found for this signature in database
GPG key ID: 1260E46482E63562
2 changed files with 9 additions and 2 deletions

View file

@ -343,7 +343,8 @@ unset GUIX_PROFILE PROFILE_FILE
;; leading to a build failure of "files.drv".
(assert-no-duplicates files)
(file-union "files" files))
;; Allow symlinks to locations outside the store.
(file-union "files" files #:dangling-symlinks? #t))
;; Used by symlink-manager
(define home-files-directory "files")