diff --git a/hosts/hydra-1/configuration.nix b/hosts/hydra-1/configuration.nix index 94dcb5d..9788887 100644 --- a/hosts/hydra-1/configuration.nix +++ b/hosts/hydra-1/configuration.nix @@ -23,10 +23,28 @@ ]; networking.useDHCP = false; - networking.interfaces.ens18.ipv6.addresses = [ { address = "2001:638:904:ffcb::a"; prefixLength = 64; } ]; - networking.interfaces.ens19.ipv4.addresses = [ { address = "192.168.10.36"; prefixLength = 24; } ]; - networking.defaultGateway6 = { address = "2001:638:904:ffcb::1"; interface = "ens18"; }; - networking.defaultGateway = { address = "192.168.10.1"; interface = "ens19"; }; + systemd.network.enable = true; + + systemd.network.networks."10-wan" = { + matchConfig.Name = "ens18"; + address = [ + "2001:638:904:ffcb::a/64" + ]; + routes = [ + { Gateway = "2001:638:904:ffcb::1"; } + ]; + linkConfig.RequiredForOnline = "routable"; + }; + systemd.network.networks."10-nat-netz-mercury" = { + matchConfig.Name = "ens19"; + address = [ + "192.168.10.36/24" + ]; + routes = [ + { Gateway = "192.168.10.1"; } + ]; + linkConfig.RequiredForOnline = "routable"; + }; services.nginx.enable = true;