network-manager

connectivity v1.0.0

NetworkManager for wired and wireless network management

Additional Documentation

Build-time Network Profiles

IGconf_nm_cmds accepts a path to a file containing nmcli commands to run inside the chroot at build time, with each line passed to the shell via eval with nmcli prepended. Refer to nmcli for the upstream documentation reference.

For example, a WPA2 profile for a network named Guest Only:

nm.cmds
--offline connection add type wifi ifname wlan0 con-name "Guest Only" ssid "Guest Only" wifi-sec.auth-alg open wifi-sec.key-mgmt wpa-psk wifi-sec.psk <passphrase> connection.autoconnect-retries 0 > /etc/NetworkManager/system-connections/Guest_Only.nmconnection
Note
It’s possible to incorporate a | grep -v '^Warning' filter before the redirection to work around a known NetworkManager bug where nmcli --offline emits spurious warnings on stdout that would corrupt the keyfile.

Connection keyfiles are installed under /etc/NetworkManager/system-connections/. NetworkManager requires these files to be owned by root and mode 0600. The layer enforces this automatically after all commands have run.

The commands file can be supplied via different mechanisms.

Config YAML (absolute path)

nm:
  cmds: /path/to/nm.cmds

Config YAML (source-relative path)

Use the ${@SRCROOT} anchor to express the path relative to the source root (the directory passed via rpi-image-gen -S):

nm:
  cmds: ${@SRCROOT}/nm.cmds

Command line

$ rpi-image-gen build -S ./examples/myimage/ -c myimage.yaml -- IGconf_nm_cmds=/path/to/nm.cmds

Relationships

Required by:

network-manager-iwd

Provides: network-activator, network-renderer

Requires Provider: systemd

Configuration Variables

Declares (prefix: nm):

Variable Description Default Validation Policy
IGconf_nm_cmds Path to a file containing nmcli commands to run inside the chroot at build time, one per line without the leading 'nmcli'. Each line is evaluated by the shell, so pipes and redirections are supported. This may be useful for installing specific network configurations. Use standard shell quoting for values containing spaces. Lines beginning with # are ignored. Example: --offline connection add type wifi ifname wlan0 con-name '$SSID' ssid '$SSID' \ wifi-sec.auth-alg open wifi-sec.key-mgmt wpa-psk wifi-sec.psk '$PSK' \ connection.autoconnect-retries 0 | grep -v '^Warning' \ > /etc/NetworkManager/system-connections/'$SSID'.nmconnection See nmcli(1). <empty> String value (may be empty) immediate

mmdebstrap

Packages

Installs:

Attributes

File: net-misc/network-manager.yaml

Type: static

Overlay: base