From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SG1UABJneWHiHwAAgWs5BA (envelope-from ) for ; Wed, 27 Oct 2021 16:49:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id CJO0NxFneWGEAQAAbx9fmQ (envelope-from ) for ; Wed, 27 Oct 2021 14:49:53 +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 8DF5736401 for ; Wed, 27 Oct 2021 16:49:53 +0200 (CEST) Received: from localhost ([::1]:51470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfkFT-0007xV-7T for larch@yhetil.org; Wed, 27 Oct 2021 10:49:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfjXB-0008Pp-OK for guix-patches@gnu.org; Wed, 27 Oct 2021 10:04:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38548) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfjXB-0005Gz-Ej for guix-patches@gnu.org; Wed, 27 Oct 2021 10:04:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mfjXB-0002Zj-Ak for guix-patches@gnu.org; Wed, 27 Oct 2021 10:04:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51440] [PATCH 09/10] services: Define '%loopback-static-networking'. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Oct 2021 14:04:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51440 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51440@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 51440-submit@debbugs.gnu.org id=B51440.16353434019762 (code B ref 51440); Wed, 27 Oct 2021 14:04:05 +0000 Received: (at 51440) by debbugs.gnu.org; 27 Oct 2021 14:03:21 +0000 Received: from localhost ([127.0.0.1]:50084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfjWS-0002XJ-SR for submit@debbugs.gnu.org; Wed, 27 Oct 2021 10:03:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfjWM-0002W2-6K for 51440@debbugs.gnu.org; Wed, 27 Oct 2021 10:03:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37980) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfjWG-00058g-VR; Wed, 27 Oct 2021 10:03:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=9ixZsw9w1H86Yy9qbxjswPmAlVRihcKD1Z3y9hqnY+g=; b=Kwa8tzUTcdI/RcRHkOpe J9TLaDOhu8FZ/ccxLrmX6tQ+SXgUfEd4DBXjquf3a6jnCAMmbWkDuvRfb0foCfsSyuvVKK8ENRYM7 DYKklZ8GZTRHNPYUwKWtg4PpLIEeJy013xDOQTJ7ZgV4w6ddzhYhRyWhBn++zfBl7+ateTOV8gZl4 j69ZaKxcG6Fe1M68TlzQUE4Bp45Xw9R+qs9HyNW6pfM94wPUii7sx+cmPAmwuIj1EjTuN8KZ76Qg7 vurTQvFIhKZ3z9iWsjuPlLsGgKVyt1M3CcHXG85Gxy/Eu2SlPSiHbYhQviSkyFE6JQLqJjvA+2Lss hCvgk8NPcGZ0cA==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=55004 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfjWG-0002Tf-Iq; Wed, 27 Oct 2021 10:03:08 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 27 Oct 2021 16:02:44 +0200 Message-Id: <20211027140245.18970-9-ludo@gnu.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211027140245.18970-1-ludo@gnu.org> References: <20211027140245.18970-1-ludo@gnu.org> 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635346193; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9ixZsw9w1H86Yy9qbxjswPmAlVRihcKD1Z3y9hqnY+g=; b=B0dzRxVtxPm0rw9jDbIe7Zp6sGFwlE7R551v5RovljskboP0IeAaGRA4j73QzwFGA3/BGW AqhkgXcOSBMp/zvm7vtLnPU4YLgXZtqOsEdQg9wtrO+2QwLGNq6x0Hlc7GbFVFi9lcefJo YMv4BiP485uEORgqbYcRu8McM8QGA9HvA3O6riPAhEXyHWmqTRr5jRq8fq+jvUGQSKcLyp Rndu6iQw08o+fdMvn/TOuFByVbxTTXBA97i4MBZzzMObf44rj/5sDhMzGYFdauRQbwHJQS YYE3jKTBfnfi0M1IIxVFjpGp3L/19D+6rB60PG2qfIxwsczkIhYfTND5xopv6Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635346193; a=rsa-sha256; cv=none; b=RW55NXoMQOywzg7+8AgW+piAIGHEgW2QMQjarGTRFeVfa9XA6xeHLcAcF8tpY0zbaymXOS JLnl19soBNIWD9OlMaJiUYS9dk+rTcuCY/ox7SMwhqAIp69Gtpwsv6mlxQ0XA7jdUGdEjy +OmaonGvP7AcWZb5XBrNYv+hZaBswNqR2jCuJO6EIf11qVpXjykTk1QjMpIJH2tY3gLnn2 aTiBPan40APRWPH3AqsP4EtWLt6VUSbgIfNnOX2cmf8T4/RqvpJnBac2UouR1WA0LfpWHo 4vPVTqK8J6oEp4Yp2drIzxslI7U577ASFPEzvC5uaNv3jWLXGGDZjgt6j5AixQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Kwa8tzUT; 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-Spam-Score: 3.57 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Kwa8tzUT; 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: 8DF5736401 X-Spam-Score: 3.57 X-Migadu-Scanner: scn0.migadu.com X-TUID: VFCnomd8ss6L * 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. --- doc/guix.texi | 7 +++++++ gnu/services/base.scm | 17 +++++++++++------ gnu/system/hurd.scm | 8 +------- gnu/system/install.scm | 8 +------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 0b23075d8c..b8b9cf2730 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -16923,6 +16923,13 @@ List of arguments for this type of link. @end table @end deftp +@cindex loopback device +@defvr {Scheme Variable} %loopback-static-networking +This is the @code{static-networking} record representing the ``loopback +device'', @code{lo}, for IP addresses 127.0.0.1 and ::1, and providing +the @code{loopback} Shepherd service. +@end defvr + @cindex networking, with QEMU @cindex QEMU, networking @defvr {Scheme Variable} %qemu-static-networking diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 380be1c71e..66683f153f 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -113,6 +113,7 @@ (define-module (gnu services base) static-networking-service static-networking-service-type + %loopback-static-networking %qemu-static-networking udev-configuration @@ -2658,6 +2659,15 @@ (define-deprecated (static-networking-service interface ip (provision provision) (name-servers name-servers))))) +(define %loopback-static-networking + ;; The loopback device. + (static-networking + (addresses (list (network-address + (device "lo") + (value "127.0.0.1")))) + (requirement '()) + (provision '(loopback)))) + (define %qemu-static-networking ;; Networking configuration for QEMU's user-mode network stack (info "(QEMU) ;; Using the user mode network stack"). @@ -2702,12 +2712,7 @@ (define %base-services (tty "tty6"))) (service static-networking-service-type - (list (static-networking - (addresses (list (network-address - (device "lo") - (value "127.0.0.1")))) - (requirement '()) - (provision '(loopback))))) + (list %loopback-static-networking)) (syslog-service) (service urandom-seed-service-type) (service guix-service-type) diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm index ec8484d746..2acc7b7e11 100644 --- a/gnu/system/hurd.scm +++ b/gnu/system/hurd.scm @@ -79,13 +79,7 @@ (define %base-services/hurd (service hurd-getty-service-type (hurd-getty-configuration (tty "tty2"))) (service static-networking-service-type - (list (static-networking - (addresses - (list (network-address - (device "lo") - (value "127.0.0.1")))) - (requirement '()) - (provision '(loopback))) + (list %loopback-static-networking ;; QEMU user-mode networking. To get "eth0", you need ;; QEMU to emulate a device for which Mach has an diff --git a/gnu/system/install.scm b/gnu/system/install.scm index bdfe580145..073d7df1db 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -408,13 +408,7 @@ (define bare-bones-os ;; Loopback device, needed by OpenSSH notably. (service static-networking-service-type - (list (static-networking - (addresses - (list (network-address - (device "lo") - (value "127.0.0.1")))) - (requirement '()) - (provision '(loopback))))) + (list %loopback-static-networking)) (service wpa-supplicant-service-type) (dbus-service) -- 2.33.0