From 49af34cfac89d384c46269bfd9388b2c73b1220a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 22 Oct 2019 18:05:51 +0200 Subject: pull: Honor '/etc/guix/channels.scm'. * guix/scripts/pull.scm (channel-list)[global-file]: New variable. [channels]: Honor it. * doc/guix.texi (Invoking guix pull): Document it. --- guix/scripts/pull.scm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'guix') diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 7876019eac..80d070652b 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -714,6 +714,9 @@ transformations specified in OPTS (resulting from '--url', '--commit', or (define default-file (string-append (config-directory) "/channels.scm")) + (define global-file + (string-append %sysconfdir "/guix/channels.scm")) + (define (load-channels file) (let ((result (load* file (make-user-module '((guix channels)))))) (if (and (list? result) (every channel? result)) @@ -725,6 +728,8 @@ transformations specified in OPTS (resulting from '--url', '--commit', or (load-channels file)) ((file-exists? default-file) (load-channels default-file)) + ((file-exists? global-file) + (load-channels global-file)) (else %default-channels))) -- cgit v1.2.3