From 7365e16db8abb0e66946404f621a30039ab38aa9 Mon Sep 17 00:00:00 2001 From: Alexey Abramov Date: Tue, 23 Sep 2025 11:44:58 +0200 Subject: [PATCH] services: dhcpcd: Add shepherd-provision field. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/guix.texi (Networking Setup): Regenerate the dhcpcd-configuration documentation. * gnu/services/networking.scm (dhcpcd-configuration) : Add new field. Fix typo in client-id description. (dhcpcd-shepherd-service): Use it. Signed-off-by: Ludovic Courtès --- doc/guix.texi | 12 +++++++++++- gnu/services/networking.scm | 11 ++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 759f0446594391b15dbd4bab28d6ef30d349ea26..fe057a98df235ae10d186b16bf2fa6aeb6744fed 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -22096,6 +22096,9 @@ resolver: @end lisp @end defvar + +@c %start of fragment + @deftp {Data Type} dhcpcd-configuration Available @code{dhcpcd-configuration} fields are: @@ -22150,11 +22153,15 @@ refer to @uref{https://www.rfc-editor.org/rfc/rfc2132#section-9.13,RFC @item @code{client-id} (type: maybe-string) Use the interface hardware address or the given string as a client -identifier, this is matually exclusive with the @code{duid} option. +identifier, this is mutually exclusive with the @code{duid} option. @item @code{extra-content} (type: maybe-string) Extra content to append to the configuration as-is. +@item @code{shepherd-provision} (default: @code{(networking)}) (type: list-of-symbols) +This is a list of symbols naming Shepherd services provided by this +service. + @item @code{shepherd-requirement} (default: @code{()}) (type: list-of-symbols) This is a list of symbols naming Shepherd services that this service will depend on. @@ -22163,6 +22170,9 @@ will depend on. @end deftp + +@c %end of fragment + @cindex NetworkManager @defvar network-manager-service-type diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index b0d1c74490b2b336e5a5aa350d91ba5d5701a7dd..646c86204098117a7c68b69925890dde261f6454 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -629,13 +629,18 @@ to @uref{https://www.rfc-editor.org/rfc/rfc2132#section-9.13,RFC 2132}.") (client-id maybe-string "Use the interface hardware address or the given string as a client identifier, -this is matually exclusive with the @code{duid} option.") +this is mutually exclusive with the @code{duid} option.") ;; Escape hatch for the generated configuration file. (extra-content maybe-string "Extra content to append to the configuration as-is.") + (shepherd-provision + (list-of-symbols '(networking)) + "This is a list of symbols naming Shepherd services provided by this service." + empty-serializer) + (shepherd-requirement (list-of-symbols '()) "This is a list of symbols naming Shepherd services that this service @@ -662,11 +667,11 @@ will depend on." (define (dhcpcd-shepherd-service config) (match-record config - (command-arguments interfaces shepherd-requirement) + (command-arguments interfaces shepherd-provision shepherd-requirement) (let ((config-file (dhcpcd-config-file config))) (list (shepherd-service (documentation "dhcpcd daemon.") - (provision '(networking)) + (provision shepherd-provision) (requirement `(user-processes udev ,@shepherd-requirement)) (actions (list (shepherd-configuration-action config-file))) (start