diff --git a/hosts/osmium/configuration.nix b/hosts/osmium/configuration.nix index 243cc12..83aae36 100644 --- a/hosts/osmium/configuration.nix +++ b/hosts/osmium/configuration.nix @@ -21,10 +21,28 @@ ]; networking.useDHCP = false; - networking.interfaces.ens18.ipv4.addresses = [ { address = "192.168.10.29"; prefixLength = 24; } ]; - networking.interfaces.ens19.ipv6.addresses = [ { address = "2001:638:904:ffc7::6"; prefixLength = 64; } ]; - networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; }; - networking.defaultGateway6 = { address = "2001:638:904:ffc7::1"; interface = "ens19"; }; + systemd.network.enable = true; + + systemd.network.networks."10-wan" = { + matchConfig.Name = "ens19"; + address = [ + "2001:638:904:ffc7::6/64" + ]; + routes = [ + { Gateway = "2001:638:904:ffc7::1"; } + ]; + linkConfig.RequiredForOnline = "routable"; + }; + systemd.network.networks."10-nat-netz-mercury" = { + matchConfig.Name = "ens18"; + address = [ + "192.168.10.29/24" + ]; + routes = [ + { Gateway = "192.168.10.1"; } + ]; + linkConfig.RequiredForOnline = "routable"; + }; environment.systemPackages = with pkgs; [ git