diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2021-10-27 12:26:31 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2021-12-12 23:20:50 +0100 |
| commit | 5967aee398c26a4814da1d8dba3f2dba84b06a4b (patch) | |
| tree | bc6b08807abc7ac3eb4afdd3265dc12c341e8ba3 | |
| parent | 1644f4f1f8957f3f3a88037aed80d501fdceaae7 (diff) | |
services: Define '%loopback-static-networking'.
* gnu/services/base.scm (%loopback-static-networking): New variable.
(%base-services): Use it.
* gnu/system/hurd.scm (%base-services/hurd): Use it.
* gnu/system/install.scm (%installation-services): Use it.
* doc/guix.texi (Networking Setup): Document it.
| -rw-r--r-- | doc/guix.texi | 7 | ||||
| -rw-r--r-- | gnu/services/base.scm | 17 | ||||
| -rw-r--r-- | gnu/system/hurd.scm | 8 | ||||
| -rw-r--r-- | gnu/system/install.scm | 8 |
4 files changed, 20 insertions, 20 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 22f710d0c1a..c00ec81e445 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -17012,6 +17012,13 @@ List of arguments for this type of link. | |||
| 17012 | @end table | 17012 | @end table |
| 17013 | @end deftp | 17013 | @end deftp |
| 17014 | 17014 | ||
| 17015 | @cindex loopback device | ||
| 17016 | @defvr {Scheme Variable} %loopback-static-networking | ||
| 17017 | This is the @code{static-networking} record representing the ``loopback | ||
| 17018 | device'', @code{lo}, for IP addresses 127.0.0.1 and ::1, and providing | ||
| 17019 | the @code{loopback} Shepherd service. | ||
| 17020 | @end defvr | ||
| 17021 | |||
| 17015 | @cindex networking, with QEMU | 17022 | @cindex networking, with QEMU |
| 17016 | @cindex QEMU, networking | 17023 | @cindex QEMU, networking |
| 17017 | @defvr {Scheme Variable} %qemu-static-networking | 17024 | @defvr {Scheme Variable} %qemu-static-networking |
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 31b418dabf3..5f93483ddab 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm | |||
| @@ -116,6 +116,7 @@ | |||
| 116 | static-networking-service | 116 | static-networking-service |
| 117 | static-networking-service-type | 117 | static-networking-service-type |
| 118 | 118 | ||
| 119 | %loopback-static-networking | ||
| 119 | %qemu-static-networking | 120 | %qemu-static-networking |
| 120 | 121 | ||
| 121 | udev-configuration | 122 | udev-configuration |
| @@ -2710,6 +2711,15 @@ to handle." | |||
| 2710 | (provision (or provision '(networking))) | 2711 | (provision (or provision '(networking))) |
| 2711 | (name-servers name-servers))))) | 2712 | (name-servers name-servers))))) |
| 2712 | 2713 | ||
| 2714 | (define %loopback-static-networking | ||
| 2715 | ;; The loopback device. | ||
| 2716 | (static-networking | ||
| 2717 | (addresses (list (network-address | ||
| 2718 | (device "lo") | ||
| 2719 | (value "127.0.0.1")))) | ||
| 2720 | (requirement '()) | ||
| 2721 | (provision '(loopback)))) | ||
| 2722 | |||
| 2713 | (define %qemu-static-networking | 2723 | (define %qemu-static-networking |
| 2714 | ;; Networking configuration for QEMU's user-mode network stack (info "(QEMU) | 2724 | ;; Networking configuration for QEMU's user-mode network stack (info "(QEMU) |
| 2715 | ;; Using the user mode network stack"). | 2725 | ;; Using the user mode network stack"). |
| @@ -2754,12 +2764,7 @@ to handle." | |||
| 2754 | (tty "tty6"))) | 2764 | (tty "tty6"))) |
| 2755 | 2765 | ||
| 2756 | (service static-networking-service-type | 2766 | (service static-networking-service-type |
| 2757 | (list (static-networking | 2767 | (list %loopback-static-networking)) |
| 2758 | (addresses (list (network-address | ||
| 2759 | (device "lo") | ||
| 2760 | (value "127.0.0.1")))) | ||
| 2761 | (requirement '()) | ||
| 2762 | (provision '(loopback))))) | ||
| 2763 | (syslog-service) | 2768 | (syslog-service) |
| 2764 | (service urandom-seed-service-type) | 2769 | (service urandom-seed-service-type) |
| 2765 | (service guix-service-type) | 2770 | (service guix-service-type) |
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm index ec8484d746e..2acc7b7e117 100644 --- a/gnu/system/hurd.scm +++ b/gnu/system/hurd.scm | |||
| @@ -79,13 +79,7 @@ | |||
| 79 | (service hurd-getty-service-type (hurd-getty-configuration | 79 | (service hurd-getty-service-type (hurd-getty-configuration |
| 80 | (tty "tty2"))) | 80 | (tty "tty2"))) |
| 81 | (service static-networking-service-type | 81 | (service static-networking-service-type |
| 82 | (list (static-networking | 82 | (list %loopback-static-networking |
| 83 | (addresses | ||
| 84 | (list (network-address | ||
| 85 | (device "lo") | ||
| 86 | (value "127.0.0.1")))) | ||
| 87 | (requirement '()) | ||
| 88 | (provision '(loopback))) | ||
| 89 | 83 | ||
| 90 | ;; QEMU user-mode networking. To get "eth0", you need | 84 | ;; QEMU user-mode networking. To get "eth0", you need |
| 91 | ;; QEMU to emulate a device for which Mach has an | 85 | ;; QEMU to emulate a device for which Mach has an |
diff --git a/gnu/system/install.scm b/gnu/system/install.scm index bdfe5801453..073d7df1dbb 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm | |||
| @@ -408,13 +408,7 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m | |||
| 408 | 408 | ||
| 409 | ;; Loopback device, needed by OpenSSH notably. | 409 | ;; Loopback device, needed by OpenSSH notably. |
| 410 | (service static-networking-service-type | 410 | (service static-networking-service-type |
| 411 | (list (static-networking | 411 | (list %loopback-static-networking)) |
| 412 | (addresses | ||
| 413 | (list (network-address | ||
| 414 | (device "lo") | ||
| 415 | (value "127.0.0.1")))) | ||
| 416 | (requirement '()) | ||
| 417 | (provision '(loopback))))) | ||
| 418 | 412 | ||
| 419 | (service wpa-supplicant-service-type) | 413 | (service wpa-supplicant-service-type) |
| 420 | (dbus-service) | 414 | (dbus-service) |
