Subject: Re: bug#54398: Adding network-manager-openvpn requires a full reboot

From: Maxime Devos <[email-masked]>
Date: Tue, 15 Mar 2022 17:32:01 +0100

Maxim Cournoyer schreef op di 15-03-2022 om 11:24 [-0400]:
> 1. Add the 'network-manager-openvpn' plugin to your
> 'network-manager-configuration', like so:
> 
> --8<---------------cut here---------------start------------->8---
> (modify-services %desktop-services
>  [...]
>  (network-manager-service-type config =>
>  		               (network-manager-configuration
> 			        (inherit config)
> 			        (vpn-plugins (list network-manager-openvpn))))
> --8<---------------cut here---------------end--------------->8---

Looking at 'network-manager-environment'

(define network-manager-environment
  (match-lambda
    (($ <network-manager-configuration> network-manager dns vpn-
plugins)
     ;; Define this variable in the global environment such that
     ;; "nmcli connection import type openvpn file foo.ovpn" works.
     `(("NM_VPN_PLUGIN_DIR"
        . ,(file-append (vpn-plugin-directory vpn-plugins)
                        "/lib/NetworkManager/VPN")))))),

I expect a potential issue to be that NM_VPN_PLUGIN_DIR is a
/gnu/store/... file name and hence the plugins in there are
not adjusted by a reconfiguration.  Maybe it could instead
refer to somewhere in /run/current-system/...?

Greetings,
Maxime.