mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
nixos/networkd: add wait-online.enable option
When no interfaces are managed by systemd-networkd, it will unconditionally fail. This option allows it to be disabled in those situations where it prevents system switches from succeeding.
This commit is contained in:
parent
5bb01fc844
commit
51b5602b45
@ -1900,6 +1900,20 @@ in
|
||||
};
|
||||
|
||||
systemd.network.wait-online = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = lib.mdDoc ''
|
||||
Whether to enable the systemd-networkd-wait-online service.
|
||||
|
||||
systemd-networkd-wait-online can timeout and fail if there are no network interfaces
|
||||
available for it to manage. When systemd-networkd is enabled but a different service is
|
||||
responsible for managing the system's internet connection (for example, NetworkManager or
|
||||
connman are used to manage WiFi connections), this service is unnecessary and can be
|
||||
disabled.
|
||||
'';
|
||||
};
|
||||
anyInterface = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Whether to consider the network online when any interface is online, as opposed to all of them.
|
||||
@ -1981,6 +1995,7 @@ in
|
||||
};
|
||||
|
||||
systemd.services.systemd-networkd-wait-online = {
|
||||
inherit (cfg.wait-online) enable;
|
||||
wantedBy = [ "network-online.target" ];
|
||||
serviceConfig.ExecStart = [
|
||||
""
|
||||
|
Loading…
Reference in New Issue
Block a user