From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 4HSgFA4yB2QJ6wAASxT56A (envelope-from ) for ; Tue, 07 Mar 2023 13:46:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id eMecFA4yB2SgawAA9RJhRA (envelope-from ) for ; Tue, 07 Mar 2023 13:46:06 +0100 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 25A62C887 for ; Tue, 7 Mar 2023 13:46:06 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678193166; 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; bh=gnKb7wAenqxrfnzx9CFk3P1382+09xIH1ixUkXIJnn0=; b=Fka79HBNDMy8hYwcDndnht8MxTgnSgIkUeSSqhzkEKyKdDrbZRRa+FIk5lDPDZHdlyfV/C B4XMHffFX1cm7r6Y/raCWm7zTh6BIig9RJ2DaXHeW1VwotTIvEq0YR70pfosaUiA64kYet fUTuQfYsmEDeDENJE1uez8NaMrLxOGRCDXUcVLZfAadzYYWFqCLL7Q9NZLahCawENDu5Uc zp8/JLNaL0ppY+1XU3tXBmTKIiPJPHXjk9qTvpbhXYxhdkv7oh6g+6avp+A476XmRFBm9q BYfTJ8Hfg+WQoeZQ4R/w3ZaBQMX0Oxi1qNFUDgyomUz0Rfjy/4K4ZaV6ZMxKhw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678193166; a=rsa-sha256; cv=none; b=XqdI20dWipiMPcV8lvvhN1yH8I5J7o4ge6Sq0J4i7UjP7BHIFI2k4JOH1BE+V2zuLdYc3F dpftzpI24zCb5RDjD4kt4MrWUoR024FAJNZocqCCPqv6LFnLF32cGI2Fa45Y+gdLA2c18M tYcHsXwPeJ0+abjQFdf9N9qoQs09sTDtTWx3om6DDhRPhI94ueMfijZi5+ICT+PESMH3nm DlT9Zj6iGkUeC6dK9uTM5xpYLy7jItCZD9IKb576nto438FU04WTUjExmqZLovHTkdmSJJ Hi/CuVS7tUUvs6dlNYjP8fJyzSwdtKN+B93MnotxpqBDRnJM7V3c1F9Jm5z3hw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZWgn-0001aZ-FD; Tue, 07 Mar 2023 07:45:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZWgh-0001JY-4a for guix-patches@gnu.org; Tue, 07 Mar 2023 07:45:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZWgg-0003BY-Il for guix-patches@gnu.org; Tue, 07 Mar 2023 07:45:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pZWgg-0002BF-Cn for guix-patches@gnu.org; Tue, 07 Mar 2023 07:45:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61587] [PATCH v3 1/8] services: network-manager: Add 'shepherd-requirement' field. References: In-Reply-To: Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 07 Mar 2023 12:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61587@debbugs.gnu.org Cc: ludo@gnu.org, Bruno Victal Received: via spool by 61587-submit@debbugs.gnu.org id=B61587.16781930638261 (code B ref 61587); Tue, 07 Mar 2023 12:45:02 +0000 Received: (at 61587) by debbugs.gnu.org; 7 Mar 2023 12:44:23 +0000 Received: from localhost ([127.0.0.1]:44715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZWg3-000298-A9 for submit@debbugs.gnu.org; Tue, 07 Mar 2023 07:44:23 -0500 Received: from smtpm1.myservices.hosting ([185.26.105.232]:49162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZWg0-00028q-PZ for 61587@debbugs.gnu.org; Tue, 07 Mar 2023 07:44:21 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm1.myservices.hosting (Postfix) with ESMTP id 737FF202E5; Tue, 7 Mar 2023 13:44:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 2BE25800B3; Tue, 7 Mar 2023 13:44:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 71XQZfFAYnYG; Tue, 7 Mar 2023 13:44:18 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id A2C9A800AA; Tue, 7 Mar 2023 13:44:18 +0100 (CET) From: Bruno Victal Date: Tue, 7 Mar 2023 12:43:58 +0000 Message-Id: <6d50c6d0cf8bc441bd9f38a0e2c02613b0a90d19.1678193024.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 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: X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: 25A62C887 X-Spam-Score: -1.21 X-Migadu-Spam-Score: -1.21 List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-TUID: 4PGYYeRT75RI Note: This also makes wpa-supplicant an optional requirement. * gnu/services/networking.scm () [shepherd-requirement]: New field. (network-manager-shepherd-service): Honor it. (network-manager-configuration-shepherd-requirement): Export accessor. * doc/guix.texi (Networking Setup): Document it. --- doc/guix.texi | 6 ++++++ gnu/services/networking.scm | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 6671ba9305..ed518cbcb8 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19836,6 +19836,12 @@ Networking Setup @item @code{network-manager} (default: @code{network-manager}) The NetworkManager package to use. +@item @code{shepherd-requirement} (default: @code{'(wpa-supplicant)}) +This option can be used to provide a list of symbols naming Shepherd services +that this service will depend on, such as @code{'wpa-supplicant} or +@code{'iwd} if you require authenticated access for encrypted WiFi or Ethernet +networks. + @item @code{dns} (default: @code{"default"}) Processing mode for DNS, which affects how NetworkManager uses the @code{resolv.conf} configuration file. diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index dacf64c2d1..4a3d5b887f 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -143,6 +143,7 @@ (define-module (gnu services networking) network-manager-configuration network-manager-configuration? + network-manager-configuration-shepherd-requirement network-manager-configuration-dns network-manager-configuration-vpn-plugins network-manager-service-type @@ -1140,6 +1141,8 @@ (define-record-type* network-manager-configuration? (network-manager network-manager-configuration-network-manager (default network-manager)) + (shepherd-requirement network-manager-configuration-shepherd-requirement + (default '(wpa-supplicant))) (dns network-manager-configuration-dns (default "default")) (vpn-plugins network-manager-configuration-vpn-plugins ;list of file-like @@ -1200,7 +1203,7 @@ (define (network-manager-environment config) (define (network-manager-shepherd-service config) (match-record config - (network-manager dns vpn-plugins iwd?) + (network-manager shepherd-requirement dns vpn-plugins iwd?) (let ((conf (plain-file "NetworkManager.conf" (string-append "[main]\ndns=" dns "\n" @@ -1209,8 +1212,9 @@ (define (network-manager-shepherd-service config) (list (shepherd-service (documentation "Run the NetworkManager.") (provision '(networking)) - (requirement (append '(user-processes dbus-system loopback) - (if iwd? '(iwd) '(wpa-supplicant)))) + (requirement `(user-processes dbus-system loopback + ,@shepherd-requirement + ,@(if iwd? '(iwd) '()))) (start #~(make-forkexec-constructor (list (string-append #$network-manager "/sbin/NetworkManager") -- 2.39.1