mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
home: services: channels: Remove duplicate channels.
* gnu/home/services/guix.scm (extend-channel-list): Add function. (home-channels-service-type)[extend]: Use extend-channel-list. Change-Id: I587207b86216f075a54b6ed0b8fa998896bbed74 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
95435c4ece
commit
8da7f4a110
1 changed files with 8 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2022 Reily Siegel <mail@reilysiegel.com>
|
;;; Copyright © 2022 Reily Siegel <mail@reilysiegel.com>
|
||||||
|
;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -24,6 +25,12 @@
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:export (home-channels-service-type))
|
#:export (home-channels-service-type))
|
||||||
|
|
||||||
|
(define (extend-channel-list initial new)
|
||||||
|
(delete-duplicates
|
||||||
|
(append initial new)
|
||||||
|
(lambda (channel1 channel2)
|
||||||
|
(eq? (channel-name channel1) (channel-name channel2)))))
|
||||||
|
|
||||||
(define (channels-xdg-files channels)
|
(define (channels-xdg-files channels)
|
||||||
`(("guix/channels.scm"
|
`(("guix/channels.scm"
|
||||||
,(plain-file
|
,(plain-file
|
||||||
|
@ -37,7 +44,7 @@
|
||||||
(name 'home-channels)
|
(name 'home-channels)
|
||||||
(default-value %default-channels)
|
(default-value %default-channels)
|
||||||
(compose concatenate)
|
(compose concatenate)
|
||||||
(extend append)
|
(extend extend-channel-list)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-xdg-configuration-files-service-type
|
(list (service-extension home-xdg-configuration-files-service-type
|
||||||
channels-xdg-files)))
|
channels-xdg-files)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue