From c3d82a6f0fd153cb2af85da5da0d83fbd7733889 Mon Sep 17 00:00:00 2001 From: h8d13 Date: Thu, 25 Dec 2025 00:57:52 +0100 Subject: [PATCH 1/6] feedback --- archinstall/lib/installer.py | 16 ++++++++++++++++ archinstall/lib/interactions/network_menu.py | 2 ++ archinstall/lib/models/network.py | 14 +++++++++++++- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 36a15df686..73f4d37c76 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -768,6 +768,22 @@ def post_install_enable_networkd_resolved(*args: str, **kwargs: str) -> None: return True + def configure_nm_iwd(self) -> None: + # Create NetworkManager config directory and write iwd backend conf + nm_conf_dir = self.target / 'etc/NetworkManager/conf.d' + nm_conf_dir.mkdir(parents=True, exist_ok=True) + + iwd_backend_conf = nm_conf_dir / 'wifi_backend.conf' + iwd_backend_conf.write_text('[device]\nwifi.backend=iwd\n') + + # Disable standalone iwd service + # and enable NetworkManager + def post_install_configure_nm_iwd(*args: str, **kwargs: str) -> None: + self.disable_service('iwd.service') + self.enable_service('NetworkManager.service') + + self.post_base_install.append(post_install_configure_nm_iwd) + def mkinitcpio(self, flags: list[str]) -> bool: for plugin in plugins.values(): if hasattr(plugin, 'on_mkinitcpio'): diff --git a/archinstall/lib/interactions/network_menu.py b/archinstall/lib/interactions/network_menu.py index 14071ef2d2..7ab2a1f3cd 100644 --- a/archinstall/lib/interactions/network_menu.py +++ b/archinstall/lib/interactions/network_menu.py @@ -212,6 +212,8 @@ def ask_to_configure_network(preset: NetworkConfiguration | None) -> NetworkConf return NetworkConfiguration(NicType.ISO) case NicType.NM: return NetworkConfiguration(NicType.NM) + case NicType.NM_IWD: + return NetworkConfiguration(NicType.NM_IWD) case NicType.MANUAL: preset_nics = preset.nics if preset else [] nics = ManualNetworkConfig(tr('Configure interfaces'), preset_nics).run() diff --git a/archinstall/lib/models/network.py b/archinstall/lib/models/network.py index 88f52fd6b9..c9ed388aa2 100644 --- a/archinstall/lib/models/network.py +++ b/archinstall/lib/models/network.py @@ -17,6 +17,7 @@ class NicType(Enum): ISO = 'iso' NM = 'nm' + NM_IWD = 'nm_iwd' MANUAL = 'manual' def display_msg(self) -> str: @@ -24,7 +25,9 @@ def display_msg(self) -> str: case NicType.ISO: return tr('Copy ISO network configuration to installation') case NicType.NM: - return tr('Use NetworkManager (necessary to configure internet graphically in GNOME and KDE Plasma)') + return tr('Use Network Manager (default backend)') + case NicType.NM_IWD: + return tr('Use Network Manager (iwd backend)') case NicType.MANUAL: return tr('Manual configuration') @@ -153,6 +156,15 @@ def install_network_config( if profile_config.profile.is_desktop_profile(): installation.add_additional_packages(['network-manager-applet']) installation.enable_service('NetworkManager.service') + case NicType.NM_IWD: + # Copy ISO config first for initial connectivity + installation.copy_iso_network_config(enable_services=False) + # Configure NetworkManager with iwd backend + installation.add_additional_packages('networkmanager') + if profile_config and profile_config.profile: + if profile_config.profile.is_desktop_profile(): + installation.add_additional_packages('network-manager-applet') + installation.configure_nm_iwd() case NicType.MANUAL: for nic in self.nics: installation.configure_nic(nic) From 5bccda0a8eeb6ca01a1fcd499ed2c0e50cf8a5b5 Mon Sep 17 00:00:00 2001 From: h8d13 Date: Thu, 25 Dec 2025 01:02:23 +0100 Subject: [PATCH 2/6] feedback2 --- archinstall/default_profiles/desktop.py | 1 - archinstall/lib/models/network.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/archinstall/default_profiles/desktop.py b/archinstall/default_profiles/desktop.py index 9bd65b444b..ab582186e1 100644 --- a/archinstall/default_profiles/desktop.py +++ b/archinstall/default_profiles/desktop.py @@ -32,7 +32,6 @@ def packages(self) -> list[str]: 'wget', 'iwd', 'wireless_tools', - 'wpa_supplicant', 'smartmontools', 'xdg-utils', ] diff --git a/archinstall/lib/models/network.py b/archinstall/lib/models/network.py index c9ed388aa2..1715e02786 100644 --- a/archinstall/lib/models/network.py +++ b/archinstall/lib/models/network.py @@ -151,7 +151,7 @@ def install_network_config( enable_services=True, # Sources the ISO network configuration to the install medium. ) case NicType.NM: - installation.add_additional_packages(['networkmanager']) + installation.add_additional_packages(['networkmanager', 'wpa_supplicant']) if profile_config and profile_config.profile: if profile_config.profile.is_desktop_profile(): installation.add_additional_packages(['network-manager-applet']) From 1b188b36136275ce0d6a74d501ce1cc3623e565c Mon Sep 17 00:00:00 2001 From: h8d13 Date: Thu, 25 Dec 2025 14:00:55 +0100 Subject: [PATCH 3/6] Refactor for less duplicate code and more conscise logic Group NM types and handle configurations appropriatly - For IWD -> Copy from ISO + Disable standalone and configure back-end - For standard -> Install wpa_supplicant - For both install applet only when Desktop profile Added comments for clearer logic --- archinstall/lib/models/network.py | 34 ++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/archinstall/lib/models/network.py b/archinstall/lib/models/network.py index 1715e02786..1b756d4845 100644 --- a/archinstall/lib/models/network.py +++ b/archinstall/lib/models/network.py @@ -150,21 +150,31 @@ def install_network_config( installation.copy_iso_network_config( enable_services=True, # Sources the ISO network configuration to the install medium. ) - case NicType.NM: - installation.add_additional_packages(['networkmanager', 'wpa_supplicant']) - if profile_config and profile_config.profile: - if profile_config.profile.is_desktop_profile(): - installation.add_additional_packages(['network-manager-applet']) - installation.enable_service('NetworkManager.service') - case NicType.NM_IWD: - # Copy ISO config first for initial connectivity - installation.copy_iso_network_config(enable_services=False) - # Configure NetworkManager with iwd backend - installation.add_additional_packages('networkmanager') + case NicType.NM | NicType.NM_IWD: + # Common setup for both NetworkManager configurations + if self.type == NicType.NM_IWD: + # Copy ISO config first for initial connectivity + installation.copy_iso_network_config(enable_services=False) + + # Install NetworkManager package for both cases + packages = ['networkmanager'] + # Defautl back-end only for non-iwd + if self.type == NicType.NM: + packages.append('wpa_supplicant') + + installation.add_additional_packages(packages) + + # Desktop profile -> Always add applet if profile_config and profile_config.profile: if profile_config.profile.is_desktop_profile(): installation.add_additional_packages('network-manager-applet') - installation.configure_nm_iwd() + + # Type-specific configuration + if self.type == NicType.NM: + # Default just NM service + installation.enable_service('NetworkManager.service') + else: # NM_IWD special handling + installation.configure_nm_iwd() case NicType.MANUAL: for nic in self.nics: installation.configure_nic(nic) From a83e2b41f0f53f87c107e594c43c4442085f9875 Mon Sep 17 00:00:00 2001 From: h8d13 Date: Sat, 27 Dec 2025 10:53:02 +0100 Subject: [PATCH 4/6] Rem comments --- archinstall/lib/models/network.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/archinstall/lib/models/network.py b/archinstall/lib/models/network.py index 1b756d4845..d5e44231f8 100644 --- a/archinstall/lib/models/network.py +++ b/archinstall/lib/models/network.py @@ -151,9 +151,8 @@ def install_network_config( enable_services=True, # Sources the ISO network configuration to the install medium. ) case NicType.NM | NicType.NM_IWD: - # Common setup for both NetworkManager configurations if self.type == NicType.NM_IWD: - # Copy ISO config first for initial connectivity + # Copy ISO config for IWD installation.copy_iso_network_config(enable_services=False) # Install NetworkManager package for both cases @@ -169,7 +168,6 @@ def install_network_config( if profile_config.profile.is_desktop_profile(): installation.add_additional_packages('network-manager-applet') - # Type-specific configuration if self.type == NicType.NM: # Default just NM service installation.enable_service('NetworkManager.service') From 97df9444b12daab05b81368718d3f810a76432a0 Mon Sep 17 00:00:00 2001 From: h8d13 Date: Sat, 27 Dec 2025 14:08:54 +0100 Subject: [PATCH 5/6] Rem copy to ISO --- archinstall/lib/models/network.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/archinstall/lib/models/network.py b/archinstall/lib/models/network.py index d5e44231f8..c57d6482b5 100644 --- a/archinstall/lib/models/network.py +++ b/archinstall/lib/models/network.py @@ -151,10 +151,6 @@ def install_network_config( enable_services=True, # Sources the ISO network configuration to the install medium. ) case NicType.NM | NicType.NM_IWD: - if self.type == NicType.NM_IWD: - # Copy ISO config for IWD - installation.copy_iso_network_config(enable_services=False) - # Install NetworkManager package for both cases packages = ['networkmanager'] # Defautl back-end only for non-iwd From 1b5861bf6a18d74458ffdf362d3f784bc046ff01 Mon Sep 17 00:00:00 2001 From: h8d13 Date: Sat, 27 Dec 2025 16:37:28 +0100 Subject: [PATCH 6/6] the one commit to rule them all --- archinstall/lib/installer.py | 8 -------- archinstall/lib/models/network.py | 10 +++++----- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 73f4d37c76..88cd89365f 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -776,14 +776,6 @@ def configure_nm_iwd(self) -> None: iwd_backend_conf = nm_conf_dir / 'wifi_backend.conf' iwd_backend_conf.write_text('[device]\nwifi.backend=iwd\n') - # Disable standalone iwd service - # and enable NetworkManager - def post_install_configure_nm_iwd(*args: str, **kwargs: str) -> None: - self.disable_service('iwd.service') - self.enable_service('NetworkManager.service') - - self.post_base_install.append(post_install_configure_nm_iwd) - def mkinitcpio(self, flags: list[str]) -> bool: for plugin in plugins.values(): if hasattr(plugin, 'on_mkinitcpio'): diff --git a/archinstall/lib/models/network.py b/archinstall/lib/models/network.py index c57d6482b5..69acc06812 100644 --- a/archinstall/lib/models/network.py +++ b/archinstall/lib/models/network.py @@ -164,15 +164,15 @@ def install_network_config( if profile_config.profile.is_desktop_profile(): installation.add_additional_packages('network-manager-applet') - if self.type == NicType.NM: - # Default just NM service - installation.enable_service('NetworkManager.service') - else: # NM_IWD special handling + installation.enable_service('NetworkManager.service') + if self.type == NicType.NM_IWD: + # NM_IWD special handling installation.configure_nm_iwd() + installation.disable_service('iwd.service') + case NicType.MANUAL: for nic in self.nics: installation.configure_nic(nic) - installation.enable_service('systemd-networkd') installation.enable_service('systemd-resolved')