MCPcopy Create free account
hub / github.com/archlinux/archinstall / install_network_config

Function install_network_config

archinstall/lib/network/network_handler.py:8–48  ·  view source on GitHub ↗
(
	network_config: NetworkConfiguration,
	installation: Installer,
	profile_config: ProfileConfiguration | None = None,
)

Source from the content-addressed store, hash-verified

6
7
8def install_network_config(
9 network_config: NetworkConfiguration,
10 installation: Installer,
11 profile_config: ProfileConfiguration | None = None,
12) -> None:
13 match network_config.type:
14 case NicType.ISO:
15 _ = installation.copy_iso_network_config(
16 enable_services=True, # Sources the ISO network configuration to the install medium.
17 )
18 case NicType.NM | NicType.NM_IWD:
19 packages = ['networkmanager']
20
21 if network_config.type == NicType.NM:
22 packages.append('wpa_supplicant')
23 else:
24 packages.append('iwd')
25
26 if profile_config and profile_config.profile:
27 if profile_config.profile.is_desktop_profile():
28 packages.append('network-manager-applet')
29
30 installation.add_additional_packages(packages)
31 installation.enable_service('NetworkManager.service')
32
33 if network_config.type == NicType.NM_IWD:
34 _configure_nm_iwd(installation)
35 installation.disable_service('iwd.service')
36
37 case NicType.IWD:
38 installation.add_additional_packages(['iwd'])
39 _configure_iwd_standalone(installation)
40 installation.enable_service('iwd.service')
41 installation.enable_service('systemd-networkd.service')
42 installation.enable_service('systemd-resolved.service')
43
44 case NicType.MANUAL:
45 for nic in network_config.nics:
46 installation.configure_nic(nic)
47 installation.enable_service('systemd-networkd')
48 installation.enable_service('systemd-resolved')
49
50
51def _configure_nm_iwd(installation: Installer) -> None:

Callers 4

perform_installationFunction · 0.90
perform_installationFunction · 0.90
perform_installationFunction · 0.90
perform_installationFunction · 0.90

Calls 8

_configure_nm_iwdFunction · 0.85
is_desktop_profileMethod · 0.80
enable_serviceMethod · 0.80
disable_serviceMethod · 0.80
configure_nicMethod · 0.80

Tested by

no test coverage detected