mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 06:06:53 -05:00
services: connman: Add iwd backend support.
* gnu/services/networking.scm (connman-configuration)[iwd?]: New field. (connman-shepherd-service): Add iwd? logic, remove wpa-supplicant requirement. * doc/guix.texi: Add information about connman-configuration iwd? option. Co-authored-by: Andrew Tropin <andrew@trop.in> Signed-off-by: Andrew Tropin <andrew@trop.in>
This commit is contained in:
parent
f52cc681b0
commit
0f20fc4dd9
2 changed files with 13 additions and 4 deletions
|
@ -19770,6 +19770,9 @@ The connman package to use.
|
||||||
|
|
||||||
@item @code{disable-vpn?} (default: @code{#f})
|
@item @code{disable-vpn?} (default: @code{#f})
|
||||||
When true, disable connman's vpn plugin.
|
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 table
|
||||||
@end deftp
|
@end deftp
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,8 @@
|
||||||
;;; Copyright © 2021 Christine Lemmer-Webber <cwebber@dustycloud.org>
|
;;; Copyright © 2021 Christine Lemmer-Webber <cwebber@dustycloud.org>
|
||||||
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
|
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
|
||||||
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
|
;;; 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.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -1265,6 +1266,8 @@ (define-record-type* <connman-configuration>
|
||||||
(connman connman-configuration-connman
|
(connman connman-configuration-connman
|
||||||
(default connman))
|
(default connman))
|
||||||
(disable-vpn? connman-configuration-disable-vpn?
|
(disable-vpn? connman-configuration-disable-vpn?
|
||||||
|
(default #f))
|
||||||
|
(iwd? connman-configuration-iwd?
|
||||||
(default #f)))
|
(default #f)))
|
||||||
|
|
||||||
(define (connman-activation config)
|
(define (connman-activation config)
|
||||||
|
@ -1281,18 +1284,21 @@ (define (connman-shepherd-service config)
|
||||||
(and
|
(and
|
||||||
(connman-configuration? config)
|
(connman-configuration? config)
|
||||||
(let ((connman (connman-configuration-connman 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
|
(list (shepherd-service
|
||||||
(documentation "Run Connman")
|
(documentation "Run Connman")
|
||||||
(provision '(networking))
|
(provision '(networking))
|
||||||
(requirement
|
(requirement
|
||||||
'(user-processes dbus-system loopback wpa-supplicant))
|
(append '(user-processes dbus-system loopback)
|
||||||
|
(if iwd? '(iwd) '())))
|
||||||
(start #~(make-forkexec-constructor
|
(start #~(make-forkexec-constructor
|
||||||
(list (string-append #$connman
|
(list (string-append #$connman
|
||||||
"/sbin/connmand")
|
"/sbin/connmand")
|
||||||
"--nodaemon"
|
"--nodaemon"
|
||||||
"--nodnsproxy"
|
"--nodnsproxy"
|
||||||
#$@(if disable-vpn? '("--noplugin=vpn") '()))
|
#$@(if disable-vpn? '("--noplugin=vpn") '())
|
||||||
|
#$@(if iwd? '("--wifi=iwd_agent") '()))
|
||||||
|
|
||||||
;; As connman(8) notes, when passing '-n', connman
|
;; As connman(8) notes, when passing '-n', connman
|
||||||
;; "directs log output to the controlling terminal in
|
;; "directs log output to the controlling terminal in
|
||||||
|
|
Loading…
Reference in a new issue