From 0cb1c4105a1f6138ad9419cc28f6c059ed019224 Mon Sep 17 00:00:00 2001
From: clerie <git@clerie.de>
Date: Sun, 16 Mar 2025 17:50:59 +0100
Subject: [PATCH] hosts/clerie-backup: Enable systemd-networkd

---
 hosts/clerie-backup/configuration.nix | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/hosts/clerie-backup/configuration.nix b/hosts/clerie-backup/configuration.nix
index 298c22b..bca9dd8 100644
--- a/hosts/clerie-backup/configuration.nix
+++ b/hosts/clerie-backup/configuration.nix
@@ -14,8 +14,18 @@
   boot.loader.grub.device = "/dev/vda";
 
   networking.useDHCP = false;
-  networking.interfaces.ens18.ipv6.addresses = [ { address = "2001:638:904:ffc1::6"; prefixLength = 64; } ];
-  networking.defaultGateway6 = { address = "2001:638:904:ffc1::1"; interface = "ens18"; };
+  systemd.network.enable = true;
+
+  systemd.network.networks."10-wan" = {
+    matchConfig.Name = "ens18";
+    address = [
+      "2001:638:904:ffc1::6/64"
+    ];
+    routes = [
+      { Gateway ="2001:638:904:ffc1::1"; }
+    ];
+    linkConfig.RequiredForOnline = "routable";
+  };
 
   services.nginx.enable = true;