From 256bd712648f404451f820eaedab3985df819556 Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Sat, 30 Oct 2021 12:42:37 +0200 Subject: [PATCH] guix home: import: Delete duplicate modules when importing. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two different services might require the same module(s), so delete duplicates when generating the ‘use-modules’ form. * import.scm (manifest->code): Delete duplicate modules. Signed-off-by: Ludovic Courtès --- guix/scripts/home/import.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm index 0e7c454f45..f0ae233b75 100644 --- a/guix/scripts/home/import.scm +++ b/guix/scripts/home/import.scm @@ -145,7 +145,8 @@ available." (use-modules (gnu home) (gnu packages) (gnu services) - ,@(concatenate (map cdr configurations+modules))) + ,@((compose delete-duplicates concatenate) + (map cdr configurations+modules))) ,(home-environment-template #:specs specs #:services (map first configurations+modules)))) @@ -190,7 +191,8 @@ available." (gnu home) (gnu packages) (gnu services) - ,@(concatenate (map cdr configurations+modules))) + ,@((compose delete-duplicates concatenate) + (map cdr configurations+modules))) ,@transformations