From dd164c12846c634bbd0d9a8f1f04387e96215b65 Mon Sep 17 00:00:00 2001 From: clerie <git@clerie.de> Date: Sun, 16 Mar 2025 17:07:07 +0100 Subject: [PATCH] hosts/backup-4: Migrate to systemd-networkd --- hosts/backup-4/configuration.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/hosts/backup-4/configuration.nix b/hosts/backup-4/configuration.nix index abcc0f1..2200526 100644 --- a/hosts/backup-4/configuration.nix +++ b/hosts/backup-4/configuration.nix @@ -15,8 +15,18 @@ boot.loader.grub.device = "/dev/vda"; networking.useDHCP = false; - networking.interfaces.ens18.ipv6.addresses = [ { address = "2001:638:904:ffcb::c"; prefixLength = 64; } ]; - networking.defaultGateway6 = { address = "2001:638:904:ffcb::1"; interface = "ens18"; }; + systemd.network.enable = true; + + systemd.network.networks."10-wan" = { + matchConfig.Name = "ens18"; + address = [ + "2001:638:904:ffcb::c/64" + ]; + routes = [ + { Gateway = "2001:638:904:ffcb::1"; } + ]; + linkConfig.RequiredForOnline = "routable"; + }; services.nginx.enable = true;