2021-09-18 10:52:07 +00:00
|
|
|
# NetworkManager {#sec-networkmanager}
|
|
|
|
|
|
|
|
To facilitate network configuration, some desktop environments use
|
|
|
|
NetworkManager. You can enable NetworkManager by setting:
|
|
|
|
|
|
|
|
```nix
|
2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
}
|
2021-09-18 10:52:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
some desktop managers (e.g., GNOME) enable NetworkManager automatically
|
|
|
|
for you.
|
|
|
|
|
|
|
|
All users that should have permission to change network settings must
|
|
|
|
belong to the `networkmanager` group:
|
|
|
|
|
|
|
|
```nix
|
2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
users.users.alice.extraGroups = [ "networkmanager" ];
|
|
|
|
}
|
2021-09-18 10:52:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
NetworkManager is controlled using either `nmcli` or `nmtui`
|
|
|
|
(curses-based terminal user interface). See their manual pages for
|
|
|
|
details on their usage. Some desktop environments (GNOME, KDE) have
|
|
|
|
their own configuration tools for NetworkManager. On XFCE, there is no
|
|
|
|
configuration tool for NetworkManager by default: by enabling
|
|
|
|
[](#opt-programs.nm-applet.enable), the graphical applet will be
|
|
|
|
installed and will launch automatically when the graphical session is
|
|
|
|
started.
|
|
|
|
|
|
|
|
::: {.note}
|
|
|
|
`networking.networkmanager` and `networking.wireless` (WPA Supplicant)
|
|
|
|
can be used together if desired. To do this you need to instruct
|
|
|
|
NetworkManager to ignore those interfaces like:
|
|
|
|
|
|
|
|
```nix
|
2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
networking.networkmanager.unmanaged = [
|
|
|
|
"*" "except:type:wwan" "except:type:gsm"
|
|
|
|
];
|
|
|
|
}
|
2021-09-18 10:52:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Refer to the option description for the exact syntax and references to
|
|
|
|
external documentation.
|
|
|
|
:::
|