!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

905 Members
on your Router! Declaratively manage your switching, routing, wireless, tunneling and more.266 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
29 Jun 2025
@emilazy:matrix.orgemilyif we had GTK 3 on the minimal ISO already that's uh…15:21:27
@hexa:lossy.networkhexabad15:21:45
@emilazy:matrix.orgemily(I guess we probably do now that I say that…)15:21:45
@emilazy:matrix.orgemilyit pulls in GTK via… https://github.com/stoken-dev/stoken15:22:02
@hexa:lossy.networkhexa
diff --git a/src/libnmc-base/nm-vpn-helpers.c b/src/libnmc-base/nm-vpn-helpers.c
index cbe76f5f1c..0c9185e8ff 100644
--- a/src/libnmc-base/nm-vpn-helpers.c
+++ b/src/libnmc-base/nm-vpn-helpers.c
@@ -311,13 +311,8 @@ nm_vpn_openconnect_authenticate_helper(NMSettingVpn *s_vpn, GPtrArray *secrets,
 
     port = extract_url_port(gw);
 
-    path = nm_utils_file_search_in_paths("openconnect",
-                                         "/usr/sbin/openconnect",
-                                         DEFAULT_PATHS,
-                                         G_FILE_TEST_IS_EXECUTABLE,
-                                         NULL,
-                                         NULL,
-                                         error);
+    path = g_find_program_in_path("openconnect");
+
     if (!path)
         return FALSE;
 
15:39:41
@hexa:lossy.networkhexahttps://docs.gtk.org/glib/func.find_program_in_path.html15:39:56
@emilazy:matrix.orgemily probably works, but no idea if we reliably get openconnect into the path when the plugin is enabled 15:45:05
@emilazy:matrix.orgemilyor if the plugin even uses this helper15:45:11
@hexa:lossy.networkhexa
diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix
index 803cc741ce15..66360915c724 100644
--- a/nixos/modules/services/networking/networkmanager.nix
+++ b/nixos/modules/services/networking/networkmanager.nix
@@ -15,6 +15,8 @@ let
 
   enableIwd = cfg.wifi.backend == "iwd";
 
+  withPlugin = name: builtins.elem name (map (plugin: plugin.pname) cfg.plugins);
+
   configAttrs = lib.recursiveUpdate {
     main = {
       plugins = "keyfile";
@@ -716,5 +718,9 @@ in
       ++ optional (cfg.dns == "dnsmasq") pkgs.dnsmasq;
 
     services.udev.packages = packages;
+
+    systemd.services.NetworkManager.path = lib.optionals (withPlugin "NetworkManager-openconnect") [
+      openconnect
+    ];
   };
 }
15:47:52
@hexa:lossy.networkhexaso yeah, still need to check if this makes it work15:48:11
@hexa:lossy.networkhexanot super fond of the pname lookup, but 🤷15:48:33
@hexa:lossy.networkhexait does allow some more cleanup though, because the module does some stuff unconditionally for plugins15:54:22
@hexa:lossy.networkhexalike create /var/lib/misc for dnsmasq leases!?15:54:44
@hexa:lossy.networkhexathough that is probably unrelated to plugins15:54:59
@hexa:lossy.networkhexahttps://github.com/nixos/nixpkgs/commit/f4de446573887d6241bbd64ad3e7a67c336a4aee15:56:10
@hexa:lossy.networkhexaand sure enough they do use that path https://github.com/search?q=repo%3Aimp%2Fdnsmasq%20%2Fvar%2Flib%2Fmisc&type=code 15:57:01
@emilazy:matrix.orgemilydoes it really use dnsmasq out of the box?15:58:08
@hexa:lossy.networkhexawithout openconnect i'm down to +9 MB15:58:30
@hexa:lossy.networkhexawe probably won't get nm for free, but it will be super cheap for a lot of UX gain 15:58:36
@hexa:lossy.networkhexaprobably when you set up an AP15:58:41

Show newer messages


Back to Room ListRoom Version: 6