updating netbird service to be launched multiple time

This commit is contained in:
Jean-François GUILLAUME 2024-10-30 15:35:44 +01:00
parent b5815133d6
commit 04a80ea994
GPG key ID: 38751DAE145EFB5A
2 changed files with 14 additions and 14 deletions

View file

@ -1,4 +1,4 @@
(define-module (glicid packages vpn)
(define-module (yamit packages vpn)
#:use-module (guix)
#:use-module (ice-9 match)
#:use-module ((guix licenses) #:prefix license:)
@ -32,7 +32,7 @@
(build-system copy-build-system)
(arguments
`(#:install-plan `(("netbird" "/bin/"))))
(propagated-inputs (list openresolv iptables nftables ebtables))
(propagated-inputs (list openresolv iptables nftables ebtables le-certs nss-certs))
(synopsis "NetBird combines a configuration-free peer-to-peer private network and a centralized access control system in a single platform, making it easy to create secure private networks for your organization or home.
Connect. NetBird creates a WireGuard-based overlay network that automatically connects your machines over an encrypted tunnel, leaving behind the hassle of opening ports, complex firewall rules, VPN gateways, and so forth.
Secure. NetBird enables secure remote access by applying granular access policies while allowing you to manage them intuitively from a single place. Works universally on any infrastructure.")

View file

@ -38,11 +38,11 @@
(define-record-type* <netbird-configuration> netbird-configuration
make-netbird-configuration
netbird-configuration?
(instance-name instance-name (default '(netbird)))
(netbird netbird (default netbird-cli))
(config-file config-file (default "/etc/netbird/config.json"))
(daemon-addr daemon-addr (default "unix:///var/run/netbird.sock"))
(log-file log-file (default "/var/log/netbird.log"))
)
(log-file log-file (default "/var/log/netbird.log")))
(define %netbird-activation
#~(begin
@ -51,27 +51,27 @@
(define netbird-shepherd-service
(match-lambda
(($ <netbird-configuration> netbird config-file daemon-addr log-file)
(($ <netbird-configuration> instance-name netbird config-file daemon-addr log-file)
(list
(shepherd-service
(provision '(netbird))
(provision instance-name)
(documentation "Run netbird daemon.")
(requirement '(user-processes))
(requirement '(user-processes networking))
(respawn? #t)
(start #~(make-forkexec-constructor
(list (string-append #$netbird "/bin/netbird")
"service"
"run"
"--config"
#$config-file
"--config" #$config-file
"--log-level"
"info"
"--daemon-addr"
#$daemon-addr
"--log-file"
"console")
"--daemon-addr" #$daemon-addr
"--log-file" "console")
#:environment-variables (list
"PATH=/run/current-system/profile/bin:/run/current-system/profile/sbin:/run/current-system/profile/libexec")
"PATH=/run/current-system/profile/bin:/run/current-system/profile/sbin:/run/current-system/profile/libexec"
"CURL_CA_BUNDLE=/run/current-system/profile/etc/ssl/certs/ca-certificates.crt"
"SSL_CERT_FILE=/run/current-system/profile/etc/ssl/certs/ca-certificates.crt"
"SSL_CERT_DIR=/run/current-system/profile/etc/ssl/certs")
#:log-file #$log-file ))
(stop #~(make-kill-destructor)))))))