diff --git a/machines/vpn.metznet.ca.scm b/machines/vpn.metznet.ca.scm deleted file mode 100644 index 935fd36..0000000 --- a/machines/vpn.metznet.ca.scm +++ /dev/null @@ -1,26 +0,0 @@ -(define-module (machines vpn.metznet.ca) - #:use-module (guix gexp) - #:use-module (gnu system) - #:use-module (gnu services) - #:use-module (gnu services certbot) - #:use-module (gnu services vpn) - #:use-module (system base-system)) - -(operating-system - (inherit %metznet-base-server-system) - (host-name "vpn.metznet.ca") - (services - (append (list (service openvpn-server-service-type - (openvpn-server-configuration - (tls-auth "/etc/openvpn/ta.key") - (server "10.0.80.0 255.255.255.0"))) - - (simple-service 'vpn-server-etc etc-service-type - `(("openvpn/dh2048.pem" ,(local-file "dh2048.pem")))) - (service certbot-service-type - (certbot-configuration (email "admin@metznet.ca") - (certificates (list (certificate-configuration - (domains ' - ("vpn.metznet.ca")))))))) - (modify-services %metznet-server-services (delete openvpn-client-service-type))))) - diff --git a/machines/vpn.scm b/machines/vpn.scm new file mode 100644 index 0000000..8d7cda1 --- /dev/null +++ b/machines/vpn.scm @@ -0,0 +1,29 @@ +(define-module (machines vpn) + #:use-module (guix gexp) + #:use-module (gnu system) + #:use-module (gnu services) + #:use-module (gnu services certbot) + #:use-module (gnu services vpn) + #:use-module (system base-system) + + #:export (vpn.metznet.ca)) + +(define-public vpn.metznet.ca + (operating-system + (inherit %metznet-base-server-system) + (host-name "vpn.metznet.ca") + (services + (append (list (service openvpn-server-service-type + (openvpn-server-configuration + (tls-auth "/etc/openvpn/ta.key") + (server "10.0.80.0 255.255.255.0"))) + + (simple-service 'vpn-server-etc etc-service-type + `(("openvpn/dh2048.pem" ,(local-file "dh2048.pem")))) + (service certbot-service-type + (certbot-configuration (email "admin@metznet.ca") + (certificates (list (certificate-configuration + (domains ' + ("vpn.metznet.ca")))))))) + (modify-services %metznet-server-services (delete openvpn-client-service-type)))))) +