From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EKS3ICXwyF+mSAAA0tVLHw (envelope-from ) for ; Thu, 03 Dec 2020 14:03:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WDCNHCXwyF+wfgAAbx9fmQ (envelope-from ) for ; Thu, 03 Dec 2020 14:03:17 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E20C39408FF for ; Thu, 3 Dec 2020 14:03:16 +0000 (UTC) Received: from localhost ([::1]:48518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkpCV-0005fP-Qu for larch@yhetil.org; Thu, 03 Dec 2020 09:03:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkpCI-0005dL-Qj for guix-patches@gnu.org; Thu, 03 Dec 2020 09:03:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55658) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kkpCI-0006jY-IH for guix-patches@gnu.org; Thu, 03 Dec 2020 09:03:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kkpCI-0008G7-FP for guix-patches@gnu.org; Thu, 03 Dec 2020 09:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45023] [PATCH] install: Discover local substitute servers. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 03 Dec 2020 14:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45023 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45023@debbugs.gnu.org Cc: Mathieu Othacehe X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160700414631702 (code B ref -1); Thu, 03 Dec 2020 14:03:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Dec 2020 14:02:26 +0000 Received: from localhost ([127.0.0.1]:38971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkpBi-0008FG-KS for submit@debbugs.gnu.org; Thu, 03 Dec 2020 09:02:26 -0500 Received: from lists.gnu.org ([209.51.188.17]:41288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkpBg-0008F8-Uo for submit@debbugs.gnu.org; Thu, 03 Dec 2020 09:02:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkpBc-0004tz-3n for guix-patches@gnu.org; Thu, 03 Dec 2020 09:02:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43961) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkpBS-0006Vv-PZ for guix-patches@gnu.org; Thu, 03 Dec 2020 09:02:12 -0500 Received: from [2a01:e0a:19b:d9a0:ec50:e664:fea6:2900] (port=53610 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kkpBR-0002Wt-Gx; Thu, 03 Dec 2020 09:02:10 -0500 From: Mathieu Othacehe Date: Thu, 3 Dec 2020 15:01:55 +0100 Message-Id: <20201203140155.166988-1-othacehe@gnu.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 2.22 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E20C39408FF X-Spam-Score: 2.22 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: O+TNQnW5xkCd * gnu/system/install.scm (%installation-services): Add avahi-service-type and enable substitute server discover in guix-service-type. []: Set it to %mdns-host-lookup-nss. --- Hello, This allows the installation image to use local substitute servers discovered using Avahi. It only increases the image closure by 10MiB. Thanks, Mathieu gnu/system/install.scm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 7701297411..7720a42c60 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -34,6 +34,7 @@ #:use-module ((guix store) #:select (%store-prefix)) #:use-module (gnu installer) #:use-module (gnu system locale) + #:use-module (gnu services avahi) #:use-module (gnu services dbus) #:use-module (gnu services networking) #:use-module (gnu services shepherd) @@ -335,11 +336,18 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m ;; The usual services. (syslog-service) + ;; Use the Avahi daemon to discover substitute servers on the local + ;; network. It can be faster than fetching from remote servers. + (service avahi-service-type + (avahi-configuration (debug? #t))) + ;; The build daemon. Register the default substitute server key(s) - ;; as trusted to allow the installation process to use substitutes by - ;; default. + ;; as trusted to allow the installation process to use substitutes + ;; by default. (service guix-service-type - (guix-configuration (authorize-key? #t))) + (guix-configuration + (authorize-key? #t) + (discover? #t))) ;see above. ;; Start udev so that useful device nodes are available. ;; Use device-mapper rules for cryptsetup & co; enable the CRDA for @@ -435,6 +443,7 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m (host-name "gnu") (timezone "Europe/Paris") (locale "en_US.utf8") + (name-service-switch %mdns-host-lookup-nss) (bootloader (bootloader-configuration (bootloader grub-bootloader) (target "/dev/sda"))) -- 2.29.2