From f52c7ac502de1a6d9c12605dd2f633ec2857d0af Mon Sep 17 00:00:00 2001 From: Constantin Gierczak--Galle Date: Wed, 4 Dec 2024 18:06:01 +0100 Subject: [PATCH] feat(dns01): use infra-wide network config --- machines/dns01/_configuration.nix | 25 +------------------------ meta/network.nix | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/machines/dns01/_configuration.nix b/machines/dns01/_configuration.nix index 897fd2b..a0a1de7 100644 --- a/machines/dns01/_configuration.nix +++ b/machines/dns01/_configuration.nix @@ -10,30 +10,7 @@ lib.extra.mkConfig { "nsd" ]; - extraConfig = { - users.users.root.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDMBW7rTtfZL9wtrpCVgariKdpN60/VeAzXkh9w3MwbO julien@enigma" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKrijwPlb7KQkYPLznMPVzPPT69cLzhEsJzZi9tmxzTh cst1@x270" - ]; - systemd.network = { - config.routeTables = { - he = 100; - mwan = 110; - }; - networks = { - "10-ens18" = { - name = "ens18"; - - networkConfig = { - Description = "ENS uplink"; - Address = [ "129.199.146.102/24" ]; - Gateway = "129.199.146.254"; - LLDP = true; - }; - }; - }; - }; - }; + extraConfig = { }; root = ./.; } diff --git a/meta/network.nix b/meta/network.nix index 62c03f2..e1b8c2f 100644 --- a/meta/network.nix +++ b/meta/network.nix @@ -1,8 +1,20 @@ { dns01 = { - interfaces = { }; + interfaces = { + ens18 = { + ipv4 = [ + { + address = "129.199.146.102"; + prefixLength = 24; + } + ]; - addresses.ipv4 = [ "129.199.146.102" ]; + gateways = [ "129.199.146.254" ]; + enableDefaultDNS = true; + }; + }; + + #addresses.ipv4 = [ "129.199.146.102" ]; hostId = "1758233d"; };