environment: Use inherit for new mapping.

* guix/scripts/environment.scm (override-user-mappings): Use inherit.

Change-Id: Iadd9b838f6442a8080998ed7e07414db562068bf
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Tomas Volf 2025-05-18 15:39:34 +02:00 committed by Ludovic Courtès
parent e98153b96c
commit 8654aecf74
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -989,9 +989,8 @@ otherwise, return MAPPINGS."
(let ((target (file-system-mapping-target mapping)))
(if (string-prefix? home target)
(file-system-mapping
(source (file-system-mapping-source mapping))
(target (override-user-dir user home target))
(writable? (file-system-mapping-writable? mapping)))
(inherit mapping)
(target (override-user-dir user home target)))
mapping)))
mappings)))