Use openvpn client service for desktop vpn

master
noah metz 2023-12-07 17:35:02 -07:00
parent 3e7e0e5008
commit 0a5e0a3c60
1 changed files with 14 additions and 19 deletions

@ -331,6 +331,18 @@
"KerberosAuthentication yes") "KerberosAuthentication yes")
"\n")))) "\n"))))
(service krb5-service-type %metznet-krb5-config) (service krb5-service-type %metznet-krb5-config)
(service openvpn-client-service-type
(openvpn-client-configuration (ca "/var/lib/openvpn/ca.crt")
(cert
"/var/lib/openvpn/client.crt")
(key
"/var/lib/openvpn/client.key")
(tls-auth
"/var/lib/openvpn/ta.key")
(persist-key? #f)
(remote (list (openvpn-remote-configuration
(name
"vpn.metznet.ca"))))))
(service pam-krb5-service-type (service pam-krb5-service-type
(pam-krb5-configuration (pam-krb5 pam-krb5) (pam-krb5-configuration (pam-krb5 pam-krb5)
(minimum-uid 1000))) (minimum-uid 1000)))
@ -358,11 +370,7 @@
(sddm-configuration))) (sddm-configuration)))
(modify-services %desktop-services (modify-services %desktop-services
(delete gdm-service-type) (delete gdm-service-type)
(nscd-service-type config => %metznet-nscd-configuration) (nscd-service-type config => %metznet-nscd-configuration))))
(network-manager-service-type config =>
(network-manager-configuration (vpn-plugins
(list
network-manager-openvpn)))))))
(define %base-services-nscd (define %base-services-nscd
(modify-services %base-services (modify-services %base-services
@ -371,20 +379,7 @@
(define %server-services (define %server-services
(append %metznet-services (append %metznet-services
(list (service dbus-root-service-type) (list (service dbus-root-service-type)
(service dhcp-client-service-type) (service dhcp-client-service-type))))
(service openvpn-client-service-type
(openvpn-client-configuration (ca
"/var/lib/openvpn/ca.crt")
(cert
"/var/lib/openvpn/client.crt")
(key
"/var/lib/openvpn/client.key")
(tls-auth
"/var/lib/openvpn/ta.key")
(persist-key? #f)
(remote (list (openvpn-remote-configuration
(name
"vpn.metznet.ca")))))))))
(define %metznet-server-services (define %metznet-server-services
(append %server-services %base-services-nscd)) (append %server-services %base-services-nscd))