diff options
author | Jade Lovelace <software@lfcode.ca> | 2023-10-01 15:24:11 -0700 |
---|---|---|
committer | Jade Lovelace <software@lfcode.ca> | 2023-10-02 14:47:21 -0700 |
commit | 28ab2b278d782367c43092a31f8360c0454f3edc (patch) | |
tree | ae0d25e09130faac58c9d6019ab5dd402cefc600 /nixos/modules/system | |
parent | dd8af63ff7683947008161126020971ddc5091d6 (diff) | |
download | nixlib-28ab2b278d782367c43092a31f8360c0454f3edc.tar nixlib-28ab2b278d782367c43092a31f8360c0454f3edc.tar.gz nixlib-28ab2b278d782367c43092a31f8360c0454f3edc.tar.bz2 nixlib-28ab2b278d782367c43092a31f8360c0454f3edc.tar.lz nixlib-28ab2b278d782367c43092a31f8360c0454f3edc.tar.xz nixlib-28ab2b278d782367c43092a31f8360c0454f3edc.tar.zst nixlib-28ab2b278d782367c43092a31f8360c0454f3edc.zip |
nixos/networkd: make wait-online not time out
A further bug to our strange multi-user.target depending on network-online.target issue is that systemd recently changed the behaviour of systemd-networkd-wait-online to no longer consider the absence of interfaces with RequiredForOnline to be sufficient to be online: https://github.com/systemd/systemd/pull/27825 On the advice of the systemd developers (https://github.com/systemd/systemd/issues/29388), this commit changes the configuration of systemd-networkd-wait-online to pass --any by default, and lets the default DHCP interfaces be RequiredForOnline as they would be by default if the option is omitted. It is plausible that systemd-networkd-wait-online may still fail if there are no interfaces at all. However, that probably cannot be avoided.
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/networkd.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index ef8204e2cf53..82f8714f0d75 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -2724,9 +2724,12 @@ let description = lib.mdDoc '' Whether to consider the network online when any interface is online, as opposed to all of them. This is useful on portable machines with a wired and a wireless interface, for example. + + This is on by default if {option}`networking.useDHCP` is enabled. ''; type = types.bool; - default = false; + defaultText = "config.networking.useDHCP"; + default = config.networking.useDHCP; }; ignoredInterfaces = mkOption { |