;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
+;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
#f))
(define (serialize-tls-auth role location)
- (serialize-field 'tls-auth
- (string-append location " " (match role
- ('server "0")
- ('client "1")))))
+ (if location
+ (serialize-field 'tls-auth
+ (string-append location " " (match role
+ ('server "0")
+ ('client "1"))))
+ #f))
(define (tls-auth? val)
(or (eq? val #f)
(string? val)))
(key
(string "/etc/openvpn/client.key")
- "The key of the machine the daemon is running on. It must be the whose
+ "The key of the machine the daemon is running on. It must be the key whose
certificate is @code{cert}.")
(comp-lzo?
(client-to-client?
(boolean #f)
- "When true, clients are alowed to talk to each other inside the VPN.")
+ "When true, clients are allowed to talk to each other inside the VPN.")
(keepalive
(keepalive '(10 120))
(status
(string "/var/run/openvpn/status")
"The status file. This file shows a small report on current connection. It
-is trunkated and rewritten every minute.")
+is truncated and rewritten every minute.")
(client-config-dir
(openvpn-ccd-list '())
(shell (file-append shadow "/sbin/nologin")))))
(define %openvpn-activation
- #~(mkdir-p "/var/run/openvpn"))
+ #~(begin
+ (use-modules (guix build utils))
+ (mkdir-p "/var/run/openvpn")))
(define openvpn-server-service-type
(service-type (name 'openvpn-server)