diff --git a/hosts/monitoring-3/configuration.nix b/hosts/monitoring-3/configuration.nix index f0b1f5f..54ff328 100644 --- a/hosts/monitoring-3/configuration.nix +++ b/hosts/monitoring-3/configuration.nix @@ -19,10 +19,28 @@ boot.loader.grub.device = "/dev/sda"; networking.useDHCP = false; - networking.interfaces.ens18.ipv4.addresses = [ { address = "192.168.10.32"; prefixLength = 24; } ]; - networking.interfaces.ens19.ipv6.addresses = [ { address = "2001:638:904:ffca::7"; prefixLength = 64; } ]; - networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; }; - networking.defaultGateway6 = { address = "2001:638:904:ffca::1"; interface = "ens19"; }; + systemd.network.enable = true; + + systemd.network.networks."10-wan" = { + matchConfig.Name = "ens19"; + address = [ + "2001:638:904:ffca::7/64" + ]; + routes = [ + { Gateway = "2001:638:904:ffca::1"; } + ]; + linkConfig.RequiredForOnline = "routable"; + }; + systemd.network.networks."10-nat-netz-mercury" = { + matchConfig.Name = "ens18"; + address = [ + "192.168.10.32/24" + ]; + routes = [ + { Gateway = "192.168.10.1"; } + ]; + linkConfig.RequiredForOnline = "routable"; + }; services.prometheus.exporters.node.enable = true;