From a37b9636f75a9850a792f639113b546410137b37 Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Thu, 17 Oct 2019 12:00:00 +0000 Subject: [PATCH] networkmanager-fortisslvpn: create the local state directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise connecting simply fails: VPN connection: failed to connect: 'La création du fichier « /tmp/lib/NetworkManager-fortisslvpn/0507e3ef-f0e0-4153-af64-b3d9a025877c.config.XSB19Z » a échoué : No such file or directory' --- nixos/modules/services/networking/networkmanager.nix | 1 + .../networking/network-manager/fortisslvpn/default.nix | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix index 45dc36e32402..05a78d1c4486 100644 --- a/nixos/modules/services/networking/networkmanager.nix +++ b/nixos/modules/services/networking/networkmanager.nix @@ -472,6 +472,7 @@ in { systemd.tmpfiles.rules = [ "d /etc/NetworkManager/system-connections 0700 root root -" "d /etc/ipsec.d 0700 root root -" + "d /var/lib/NetworkManager-fortisslvpn 0700 root root -" "d /var/lib/dhclient 0755 root root -" "d /var/lib/misc 0755 root root -" # for dnsmasq.leases diff --git a/pkgs/tools/networking/network-manager/fortisslvpn/default.nix b/pkgs/tools/networking/network-manager/fortisslvpn/default.nix index dbf175d20c95..53d6ab2fbcf5 100644 --- a/pkgs/tools/networking/network-manager/fortisslvpn/default.nix +++ b/pkgs/tools/networking/network-manager/fortisslvpn/default.nix @@ -32,10 +32,14 @@ in stdenv.mkDerivation { configureFlags = [ "--without-libnm-glib" "--with-gnome=${if withGnome then "yes" else "no"}" - "--localstatedir=/tmp" + "--localstatedir=/var" "--enable-absolute-paths" ]; + # the installer only create an empty directory in localstatedir, so + # we can drop it + installFlags = [ "localstatedir=." ]; + passthru = { updateScript = gnome3.updateScript { packageName = pname;