File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed
Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -768,6 +768,22 @@ def post_install_enable_networkd_resolved(*args: str, **kwargs: str) -> None:
768768
769769 return True
770770
771+ def configure_nm_iwd (self ) -> None :
772+ # Create NetworkManager config directory and write iwd backend conf
773+ nm_conf_dir = self .target / 'etc/NetworkManager/conf.d'
774+ nm_conf_dir .mkdir (parents = True , exist_ok = True )
775+
776+ iwd_backend_conf = nm_conf_dir / 'wifi_backend.conf'
777+ iwd_backend_conf .write_text ('[device]\n wifi.backend=iwd\n ' )
778+
779+ # Disable standalone iwd service
780+ # and enable NetworkManager
781+ def post_install_configure_nm_iwd (* args : str , ** kwargs : str ) -> None :
782+ self .disable_service ('iwd.service' )
783+ self .enable_service ('NetworkManager.service' )
784+
785+ self .post_base_install .append (post_install_configure_nm_iwd )
786+
771787 def mkinitcpio (self , flags : list [str ]) -> bool :
772788 for plugin in plugins .values ():
773789 if hasattr (plugin , 'on_mkinitcpio' ):
Original file line number Diff line number Diff line change @@ -212,6 +212,8 @@ def ask_to_configure_network(preset: NetworkConfiguration | None) -> NetworkConf
212212 return NetworkConfiguration (NicType .ISO )
213213 case NicType .NM :
214214 return NetworkConfiguration (NicType .NM )
215+ case NicType .NM_IWD :
216+ return NetworkConfiguration (NicType .NM_IWD )
215217 case NicType .MANUAL :
216218 preset_nics = preset .nics if preset else []
217219 nics = ManualNetworkConfig (tr ('Configure interfaces' ), preset_nics ).run ()
Original file line number Diff line number Diff line change 1717class NicType (Enum ):
1818 ISO = 'iso'
1919 NM = 'nm'
20+ NM_IWD = 'nm_iwd'
2021 MANUAL = 'manual'
2122
2223 def display_msg (self ) -> str :
2324 match self :
2425 case NicType .ISO :
2526 return tr ('Copy ISO network configuration to installation' )
2627 case NicType .NM :
27- return tr ('Use NetworkManager (necessary to configure internet graphically in GNOME and KDE Plasma)' )
28+ return tr ('Use Network Manager (default backend)' )
29+ case NicType .NM_IWD :
30+ return tr ('Use Network Manager (iwd backend)' )
2831 case NicType .MANUAL :
2932 return tr ('Manual configuration' )
3033
@@ -153,6 +156,15 @@ def install_network_config(
153156 if profile_config .profile .is_desktop_profile ():
154157 installation .add_additional_packages (['network-manager-applet' ])
155158 installation .enable_service ('NetworkManager.service' )
159+ case NicType .NM_IWD :
160+ # Copy ISO config first for initial connectivity
161+ installation .copy_iso_network_config (enable_services = False )
162+ # Configure NetworkManager with iwd backend
163+ installation .add_additional_packages ('networkmanager' )
164+ if profile_config and profile_config .profile :
165+ if profile_config .profile .is_desktop_profile ():
166+ installation .add_additional_packages ('network-manager-applet' )
167+ installation .configure_nm_iwd ()
156168 case NicType .MANUAL :
157169 for nic in self .nics :
158170 installation .configure_nic (nic )
You can’t perform that action at this time.
0 commit comments