From d3400ebd3223cc0cb6dcd23c80c11d0d08df2913 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Thu, 14 Jul 2022 07:15:25 +0200
Subject: [PATCH] hetzner-network: don't stop networkd

---
 roles/hetzner-network.nix | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/roles/hetzner-network.nix b/roles/hetzner-network.nix
index 4930826..77b9fa4 100644
--- a/roles/hetzner-network.nix
+++ b/roles/hetzner-network.nix
@@ -22,6 +22,11 @@ in {
   config = {
     networking.usePredictableInterfaceNames = false;
     networking.dhcpcd.enable = false;
+    # Don't take down the network for too long, this will use `systemctl
+    # restart` rather than stopping it with `systemctl stop` followed by a
+    # delayed `systemctl start`
+    systemd.services.systemd-networkd.stopIfChanged = true;
+
     systemd.network = {
       enable = true;
       networks."ethernet".extraConfig = ''