M doc/guix.texi => doc/guix.texi +4 -0
@@ 35739,6 35739,10 @@ be executed before tearing down the interface.
List of strings or G-expressions. These are script snippets which will
be executed after tearing down the interface.
+@item @code{shepherd-requirement} (default: @code{'()}) (type: list-of-symbols)
+A list of symbols naming Shepherd services that this service
+will depend on.
+
@item @code{table} (default: @code{"auto"})
The routing table to which routes are added, as a string. There are two
special values: @code{"off"} that disables the creation of routes
M gnu/services/vpn.scm => gnu/services/vpn.scm +5 -2
@@ 88,6 88,7 @@
wireguard-configuration-post-up
wireguard-configuration-pre-down
wireguard-configuration-post-down
+ wireguard-configuration-shepherd-requirement
wireguard-configuration-table
wireguard-configuration-auto-start?
@@ 765,6 766,8 @@ strongSwan.")))
(default '()))
(post-down wireguard-configuration-post-down ;list of strings
(default '()))
+ (shepherd-requirement wireguard-configuration-shepherd-requirement ; list of symbols
+ (default '()))
(table wireguard-configuration-table ;string
(default "auto"))
(auto-start? wireguard-configuration-auto-start? ;boolean
@@ 918,12 921,12 @@ public key, if any."
(define (wireguard-shepherd-service config)
(match-record config <wireguard-configuration>
- (wireguard interface)
+ (wireguard interface shepherd-requirement)
(let ((wg-quick (file-append wireguard "/bin/wg-quick"))
(auto-start? (wireguard-configuration-auto-start? config))
(config (wireguard-configuration-file config)))
(list (shepherd-service
- (requirement '(networking))
+ (requirement `(networking user-processes ,@shepherd-requirement))
(provision (list (wireguard-service-name interface)))
(start #~(lambda _
(invoke #$wg-quick "up" #$config)))