/ configurations / nixos / rpi5 / systemd.nix
systemd.nix
 1  {
 2    systemd = {
 3      network.wait-online.enable = false;
 4      services = {
 5        # The notion of "online" is a broken concept
 6        # https://github.com/systemd/systemd/blob/e1b45a756f71deac8c1aa9a008bd0dab47f64777/NEWS#L13
 7  
 8        # https://github.com/NixOS/nixpkgs/issues/247608
 9        NetworkManager-wait-online.enable = false;
10        # Do not take down the network for too long when upgrading,
11        # This also prevents failures of services that are restarted instead of stopped.
12        # It will use `systemctl restart` rather than stopping it with `systemctl stop`
13        # followed by a delayed `systemctl start`.
14        systemd-networkd.stopIfChanged = false;
15        # Services that are only restarted might be not able to resolve when resolved is stopped before
16        systemd-resolved.stopIfChanged = false;
17      };
18    };
19  }