summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi3
-rw-r--r--gnu/services/networking.scm14
2 files changed, 13 insertions, 4 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index ac0f479e0f..27a0c62532 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -19770,6 +19770,9 @@ The connman package to use.
 
 @item @code{disable-vpn?} (default: @code{#f})
 When true, disable connman's vpn plugin.
+
+@item @code{iwd?} (default: @code{#f})
+When true, ConnMan uses iwd to connect to wireless networks.
 @end table
 @end deftp
 
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 702404bc6c..89ce16f6af 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -18,7 +18,8 @@
 ;;; Copyright © 2021 Christine Lemmer-Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
-;;; Copyright © 2022 Andrew Tropin <andrew@trop.in>
+;;; Copyright © 2022, 2023 Andrew Tropin <andrew@trop.in>
+;;; Copyright © 2023 Declan Tsien <declantsien@riseup.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1265,6 +1266,8 @@ wireless networking."))))
   (connman      connman-configuration-connman
                 (default connman))
   (disable-vpn? connman-configuration-disable-vpn?
+                (default #f))
+  (iwd?         connman-configuration-iwd?
                 (default #f)))
 
 (define (connman-activation config)
@@ -1281,18 +1284,21 @@ wireless networking."))))
   (and
    (connman-configuration? config)
    (let ((connman      (connman-configuration-connman config))
-         (disable-vpn? (connman-configuration-disable-vpn? config)))
+         (disable-vpn? (connman-configuration-disable-vpn? config))
+         (iwd?         (connman-configuration-iwd? config)))
      (list (shepherd-service
             (documentation "Run Connman")
             (provision '(networking))
             (requirement
-             '(user-processes dbus-system loopback wpa-supplicant))
+             (append '(user-processes dbus-system loopback)
+                     (if iwd? '(iwd) '())))
             (start #~(make-forkexec-constructor
                       (list (string-append #$connman
                                            "/sbin/connmand")
                             "--nodaemon"
                             "--nodnsproxy"
-                            #$@(if disable-vpn? '("--noplugin=vpn") '()))
+                            #$@(if disable-vpn? '("--noplugin=vpn") '())
+                            #$@(if iwd? '("--wifi=iwd_agent") '()))
 
                       ;; As connman(8) notes, when passing '-n', connman
                       ;; "directs log output to the controlling terminal in