diff options
author | Bruno Victal <mirai@makinata.eu> | 2023-03-07 12:44:01 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-03-10 14:49:57 +0100 |
commit | 269871d18e7d1a95fbe5dfa7360208110dde9163 (patch) | |
tree | 55491ee0b07035bf2866cb8ef3b3923bdce871ff /gnu/services | |
parent | 1545dab1fa8a09ac7936e3a9ba1134843f178e1e (diff) |
services: connman: Add 'shepherd-requirement' field.
* gnu/services/networking.scm (<connman-configuration>)
[shepherd-requirement]: New field.
(connman-shepherd-service): Honor it.
(connman-configuration-shepherd-requirement): Export accessor.
* doc/guix.texi (Networking Setup): Document it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/networking.scm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index abfaba8004..6a09f6e728 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -151,6 +151,7 @@ connman-configuration connman-configuration? connman-configuration-connman + connman-configuration-shepherd-requirement connman-configuration-disable-vpn? connman-configuration-iwd? connman-service-type @@ -1288,6 +1289,8 @@ wireless networking.")))) connman-configuration? (connman connman-configuration-connman (default connman)) + (shepherd-requirement connman-configuration-shepherd-requirement + (default '())) (disable-vpn? connman-configuration-disable-vpn? (default #f)) (iwd? connman-configuration-iwd? @@ -1303,13 +1306,14 @@ wireless networking.")))) (mkdir-p "/var/lib/connman-vpn/")))))) (define (connman-shepherd-service config) - (match-record config <connman-configuration> (connman disable-vpn? iwd?) + (match-record config <connman-configuration> (connman shepherd-requirement + disable-vpn? iwd?) (list (shepherd-service (documentation "Run Connman") (provision '(networking)) - (requirement - (append '(user-processes dbus-system loopback) - (if iwd? '(iwd) '()))) + (requirement `(user-processes dbus-system loopback + ,@shepherd-requirement + ,@(if iwd? '(iwd) '()))) (start #~(make-forkexec-constructor (list (string-append #$connman "/sbin/connmand") |