all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <othacehe@gnu.org>
To: 45023@debbugs.gnu.org
Cc: Mathieu Othacehe <othacehe@gnu.org>
Subject: [bug#45023] [PATCH] install: Discover local substitute servers.
Date: Thu,  3 Dec 2020 15:01:55 +0100	[thread overview]
Message-ID: <20201203140155.166988-1-othacehe@gnu.org> (raw)

* gnu/system/install.scm (%installation-services): Add avahi-service-type and
enable substitute server discover in guix-service-type.
[<name-service-switch>]: 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





             reply	other threads:[~2020-12-03 14:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 14:01 Mathieu Othacehe [this message]
2020-12-04 13:05 ` [bug#45023] [PATCH] install: Discover local substitute servers Mathieu Othacehe
2020-12-11 16:45   ` Ludovic Courtès
2020-12-11 20:43     ` bug#45023: " Mathieu Othacehe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201203140155.166988-1-othacehe@gnu.org \
    --to=othacehe@gnu.org \
    --cc=45023@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.