From fe41ffc788c528e3377b58275cf54cc5cfecceb0 Mon Sep 17 00:00:00 2001 From: Zuckerberg Date: Sat, 29 Jun 2024 10:11:34 -0600 Subject: [PATCH] Allow s0 to access VLANs --- common/default.nix | 4 ++-- machines/storage/s0/hardware-configuration.nix | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/common/default.nix b/common/default.nix index f2bbb1b..148f810 100644 --- a/common/default.nix +++ b/common/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { imports = [ @@ -20,7 +20,7 @@ system.stateVersion = "23.11"; - networking.useDHCP = false; + networking.useDHCP = lib.mkDefault true; networking.firewall.enable = true; networking.firewall.allowPing = true; diff --git a/machines/storage/s0/hardware-configuration.nix b/machines/storage/s0/hardware-configuration.nix index 1623539..9267844 100644 --- a/machines/storage/s0/hardware-configuration.nix +++ b/machines/storage/s0/hardware-configuration.nix @@ -58,8 +58,16 @@ }; swapDevices = [ ]; - networking.interfaces.eth0.useDHCP = true; - networking.interfaces.eth1.useDHCP = true; + networking.vlans = { + default = { + id = 1; + interface = "eth1"; + }; + iot = { + id = 2; + interface = "eth1"; + }; + }; powerManagement.cpuFreqGovernor = "powersave"; }