From 34f1edf3b3b9b96a315b11bb83849840c4408bff Mon Sep 17 00:00:00 2001 From: Zuckerberg Date: Mon, 17 Feb 2025 12:11:52 -0800 Subject: [PATCH] Fix s0 setting the incorrect default route by using a static configuration --- .../storage/s0/hardware-configuration.nix | 39 +++++++++++++++++-- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/machines/storage/s0/hardware-configuration.nix b/machines/storage/s0/hardware-configuration.nix index 95f1c3a..8c05158 100644 --- a/machines/storage/s0/hardware-configuration.nix +++ b/machines/storage/s0/hardware-configuration.nix @@ -58,12 +58,43 @@ }; swapDevices = [ ]; - networking.vlans = { - iot = { - id = 2; - interface = "eth1"; + networking = { + dhcpcd.enable = false; + + vlans = { + iot = { + id = 2; + interface = "eth1"; + }; }; + + interfaces.eth1.ipv4.addresses = [{ + address = "192.168.1.2"; + prefixLength = 21; + }]; + interfaces.iot.ipv4.addresses = [{ + address = "192.168.9.8"; + prefixLength = 22; + }]; + + defaultGateway = "192.168.1.1"; + nameservers = [ "1.1.1.1" "8.8.8.8" ]; }; + # networking = { + # vlans = { + # iot = { + # id = 2; + # interface = "eth1"; + # }; + # }; + + # defaultGateway = { + # interface = "eth1"; + # address = "192.168.1.1"; + # metric = 10; # always use this route as default gateway + # }; + # }; + powerManagement.cpuFreqGovernor = "powersave"; }