diff mbox series

[bug#63985,v3,11/11] services: NetworkManager: Add extra-options field.

Message ID e4d3466b4105381f0497a4a8d8ec1adb7a40ef28.1687816734.git.mirai@makinata.eu
State New
Headers show
Series Service subsystem improvements | expand

Commit Message

Bruno Victal June 26, 2023, 9:59 p.m. UTC
* gnu/services/networking.scm (network-manager-configuration)
[extra-options]: New field.
* doc/guix.texi (Networking Setup): Document it.
---
 doc/guix.texi               | 7 +++++++
 gnu/services/networking.scm | 9 +++++++++
 2 files changed, 16 insertions(+)

Comments

Maxim Cournoyer Oct. 5, 2023, 4:59 p.m. UTC | #1
Hi,

Bruno Victal <mirai@makinata.eu> writes:

> * gnu/services/networking.scm (network-manager-configuration)
> [extra-options]: New field.
> * doc/guix.texi (Networking Setup): Document it.

LGTM!
diff mbox series

Patch

diff --git a/doc/guix.texi b/doc/guix.texi
index 76bd1b1413..a74718f216 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20413,6 +20413,13 @@  Networking Setup
 (VPNs).  An example of this is the @code{network-manager-openvpn}
 package, which allows NetworkManager to manage VPNs @i{via} OpenVPN.
 
+@item @code{extra-options} (default: @code{'()}) (type: list-of-ini-entries)
+Additional options to be appended to @file{NetworkManager.conf} (run
+@samp{man networkmanager.conf} for more information).  It expects a list
+whose elements are lists of the form @code{'(@var{section} @var{key}
+@var{value})}, where @var{section} and @var{key} are symbols and
+@var{value} is a string.
+
 @end table
 @end deftp
 
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 33ff5e040f..4cb1cd60cb 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -179,6 +179,7 @@  (define-module (gnu services networking)
             network-manager-configuration-log-configuration
             network-manager-configuration-dns
             network-manager-configuration-vpn-plugins
+            network-manager-configuration-extra-options
             network-manager-service-type
 
             connman-configuration
@@ -1340,6 +1341,14 @@  (define-configuration network-manager-configuration
 package, which allows NetworkManager to manage VPNs @i{via} OpenVPN."
    empty-serializer)
 
+  (extra-options
+   (list-of-ini-entries '())
+   "Additional options to be appended to @file{NetworkManager.conf}  (run
+@samp{man networkmanager.conf} for more information).
+It expects a list whose elements are lists of the form
+@code{'(@var{section} @var{key} @var{value})}, where @var{section} and
+@var{key} are symbols and @var{value} is a string.")
+
   ;; Deprecated options
   (iwd?
    (boolean #f)