aboutsummaryrefslogtreecommitdiff
path: root/infra/hosts/indra/networking.nix
diff options
context:
space:
mode:
authorvkcku <[email protected]>2026-06-01 16:36:34 +0530
committervkcku <[email protected]>2026-06-01 16:36:34 +0530
commit6ed07ef251e380dd15fc5d3351e62614f102ea5e (patch)
tree01a8d0bf2a5737b8d83a3c7098bfbaa120225b93 /infra/hosts/indra/networking.nix
parentinfra: add deploy user module (diff)
infra(indra): initial configuration
monorepo-revid: f03da585dab1b846571ab225c4196750254c319f
Diffstat (limited to 'infra/hosts/indra/networking.nix')
-rw-r--r--infra/hosts/indra/networking.nix60
1 files changed, 60 insertions, 0 deletions
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"
+ '';
+ };
+}