[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#45023] [PATCH] install: Discover local substitute servers.
From: |
Mathieu Othacehe |
Subject: |
[bug#45023] [PATCH] install: Discover local substitute servers. |
Date: |
Thu, 3 Dec 2020 15:01:55 +0100 |
* 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
- [bug#45023] [PATCH] install: Discover local substitute servers.,
Mathieu Othacehe <=