mirror of
https://gitlab.univ-nantes.fr/glicid-public/guix-glicid.git
synced 2025-04-29 21:58:36 +02:00
updating netbird service to be launched multiple time
This commit is contained in:
commit
8b4dcc7705
2 changed files with 14 additions and 13 deletions
|
@ -9,6 +9,7 @@
|
||||||
#:use-module (guix build-system copy)
|
#:use-module (guix build-system copy)
|
||||||
#:use-module (guix build-system go)
|
#:use-module (guix build-system go)
|
||||||
#:use-module (nonguix build-system binary)
|
#:use-module (nonguix build-system binary)
|
||||||
|
#:use-module (gnu packages certs)
|
||||||
#:use-module (gnu packages dns)
|
#:use-module (gnu packages dns)
|
||||||
#:use-module (gnu packages gl)
|
#:use-module (gnu packages gl)
|
||||||
#:use-module (gnu packages golang)
|
#:use-module (gnu packages golang)
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
(build-system copy-build-system)
|
(build-system copy-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:install-plan `(("netbird" "/bin/"))))
|
`(#: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.
|
(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.
|
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.")
|
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.")
|
||||||
|
|
|
@ -38,11 +38,11 @@
|
||||||
(define-record-type* <netbird-configuration> netbird-configuration
|
(define-record-type* <netbird-configuration> netbird-configuration
|
||||||
make-netbird-configuration
|
make-netbird-configuration
|
||||||
netbird-configuration?
|
netbird-configuration?
|
||||||
|
(instance-name instance-name (default '(netbird)))
|
||||||
(netbird netbird (default netbird-cli))
|
(netbird netbird (default netbird-cli))
|
||||||
(config-file config-file (default "/etc/netbird/config.json"))
|
(config-file config-file (default "/etc/netbird/config.json"))
|
||||||
(daemon-addr daemon-addr (default "unix:///var/run/netbird.sock"))
|
(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
|
(define %netbird-activation
|
||||||
#~(begin
|
#~(begin
|
||||||
|
@ -51,27 +51,27 @@
|
||||||
|
|
||||||
(define netbird-shepherd-service
|
(define netbird-shepherd-service
|
||||||
(match-lambda
|
(match-lambda
|
||||||
(($ <netbird-configuration> netbird config-file daemon-addr log-file)
|
(($ <netbird-configuration> instance-name netbird config-file daemon-addr log-file)
|
||||||
(list
|
(list
|
||||||
(shepherd-service
|
(shepherd-service
|
||||||
(provision '(netbird))
|
(provision instance-name)
|
||||||
(documentation "Run netbird daemon.")
|
(documentation "Run netbird daemon.")
|
||||||
(requirement '(user-processes))
|
(requirement '(user-processes networking))
|
||||||
(respawn? #t)
|
(respawn? #t)
|
||||||
(start #~(make-forkexec-constructor
|
(start #~(make-forkexec-constructor
|
||||||
(list (string-append #$netbird "/bin/netbird")
|
(list (string-append #$netbird "/bin/netbird")
|
||||||
"service"
|
"service"
|
||||||
"run"
|
"run"
|
||||||
"--config"
|
"--config" #$config-file
|
||||||
#$config-file
|
|
||||||
"--log-level"
|
"--log-level"
|
||||||
"info"
|
"info"
|
||||||
"--daemon-addr"
|
"--daemon-addr" #$daemon-addr
|
||||||
#$daemon-addr
|
"--log-file" "console")
|
||||||
"--log-file"
|
|
||||||
"console")
|
|
||||||
#:environment-variables (list
|
#: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 ))
|
#:log-file #$log-file ))
|
||||||
(stop #~(make-kill-destructor)))))))
|
(stop #~(make-kill-destructor)))))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue