diff options
author | Xinglu Chen <public@yoctocell.xyz> | 2021-10-30 12:42:37 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-10-31 00:51:05 +0200 |
commit | 256bd712648f404451f820eaedab3985df819556 (patch) | |
tree | a8880c661223022cc443be387d27f6a2e2eecee6 /guix/scripts/home | |
parent | e12e8aad35e734fe2c4a0a54e9c6bc91eedf921d (diff) |
guix home: import: Delete duplicate modules when importing.
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 <ludo@gnu.org>
Diffstat (limited to 'guix/scripts/home')
-rw-r--r-- | guix/scripts/home/import.scm | 6 |
1 files 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 |