From 6ed07ef251e380dd15fc5d3351e62614f102ea5e Mon Sep 17 00:00:00 2001 From: vkcku Date: Mon, 1 Jun 2026 16:36:34 +0530 Subject: infra(indra): initial configuration monorepo-revid: f03da585dab1b846571ab225c4196750254c319f --- infra/hosts/indra/networking.nix | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 infra/hosts/indra/networking.nix (limited to 'infra/hosts/indra/networking.nix') diff --git a/infra/hosts/indra/networking.nix b/infra/hosts/indra/networking.nix new file mode 100644 index 0000000..066a8ef --- /dev/null +++ b/infra/hosts/indra/networking.nix @@ -0,0 +1,60 @@ +{ + flake.modules.nixos.indra = + { lib, ... }: + { + networking = { + hostName = "indra"; + hostId = "3390dcf8"; + + # The following is required to make installing Nix via `nixos-anywhere` + # work. This is the output from running `makeNetworkConf` from + # `nixos-infect`. + nameservers = [ + "8.8.8.8" + ]; + defaultGateway = "145.223.22.254"; + defaultGateway6 = { + address = "2a02:4780:12::1"; + interface = "eth0"; + }; + dhcpcd.enable = false; + usePredictableInterfaceNames = lib.mkForce false; + interfaces = { + eth0 = { + ipv4.addresses = [ + { + address = "145.223.22.205"; + prefixLength = 24; + } + ]; + ipv6.addresses = [ + { + address = "2a02:4780:12:f97f::1"; + prefixLength = 48; + } + { + address = "fe80::42e8:d4ff:feae:c8a4"; + prefixLength = 64; + } + ]; + ipv4.routes = [ + { + address = "145.223.22.254"; + prefixLength = 32; + } + ]; + ipv6.routes = [ + { + address = "2a02:4780:12::1"; + prefixLength = 128; + } + ]; + }; + }; + }; + + services.udev.extraRules = '' + ATTR{address}=="40:e8:d4:ae:c8:a4", NAME="eth0" + ''; + }; +} -- cgit v1.3.1