|
|
@ -6,13 +6,9 @@
|
|
|
|
#:use-module (gnu services vpn)
|
|
|
|
#:use-module (gnu services vpn)
|
|
|
|
#:use-module (system base-system)
|
|
|
|
#:use-module (system base-system)
|
|
|
|
|
|
|
|
|
|
|
|
#:export (vpn.metznet.ca))
|
|
|
|
#:export (vpn.metznet.ca vpn-services))
|
|
|
|
|
|
|
|
|
|
|
|
(define-public vpn.metznet.ca
|
|
|
|
(define-public vpn-services
|
|
|
|
(operating-system
|
|
|
|
|
|
|
|
(inherit %metznet-base-server-system)
|
|
|
|
|
|
|
|
(host-name "vpn.metznet.ca")
|
|
|
|
|
|
|
|
(services
|
|
|
|
|
|
|
|
(append (list (service openvpn-server-service-type
|
|
|
|
(append (list (service openvpn-server-service-type
|
|
|
|
(openvpn-server-configuration (tls-auth
|
|
|
|
(openvpn-server-configuration (tls-auth
|
|
|
|
"/etc/openvpn/ta.key")
|
|
|
|
"/etc/openvpn/ta.key")
|
|
|
@ -22,7 +18,9 @@
|
|
|
|
(simple-service 'vpn-server-etc etc-service-type
|
|
|
|
(simple-service 'vpn-server-etc etc-service-type
|
|
|
|
(let ((pki-dir (getenv "VPN_PKI_DIR")))
|
|
|
|
(let ((pki-dir (getenv "VPN_PKI_DIR")))
|
|
|
|
(if pki-dir
|
|
|
|
(if pki-dir
|
|
|
|
`(("openvpn/dh2048.pem" ,(local-file (string-append pki-dir "/dh2048.pem"))))
|
|
|
|
`(("openvpn/dh2048.pem" ,(local-file (string-append
|
|
|
|
|
|
|
|
pki-dir
|
|
|
|
|
|
|
|
"/dh2048.pem"))))
|
|
|
|
`())))
|
|
|
|
`())))
|
|
|
|
(service certbot-service-type
|
|
|
|
(service certbot-service-type
|
|
|
|
(certbot-configuration (email "admin@metznet.ca")
|
|
|
|
(certbot-configuration (email "admin@metznet.ca")
|
|
|
@ -30,5 +28,12 @@
|
|
|
|
(domains '
|
|
|
|
(domains '
|
|
|
|
("vpn.metznet.ca"))))))))
|
|
|
|
("vpn.metznet.ca"))))))))
|
|
|
|
(modify-services %metznet-server-services
|
|
|
|
(modify-services %metznet-server-services
|
|
|
|
(delete openvpn-client-service-type))))))
|
|
|
|
(delete openvpn-client-service-type))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define-public vpn.metznet.ca
|
|
|
|
|
|
|
|
(operating-system
|
|
|
|
|
|
|
|
(inherit %metznet-base-server-system)
|
|
|
|
|
|
|
|
(host-name "vpn.metznet.ca")
|
|
|
|
|
|
|
|
(services
|
|
|
|
|
|
|
|
vpn-services)))
|
|
|
|
|
|
|
|
|
|
|
|