From e04ec2e9597dc62a83afb2017c8b87c1257e97da Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Thu, 31 Aug 2023 23:50:07 +0100 Subject: [PATCH] move SWCONFIG defn into per-device files it doesn't work on qemu --- devices/gl-mt300a/default.nix | 4 +++- devices/gl-mt300n-v2/default.nix | 4 +++- modules/vlan/default.nix | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/devices/gl-mt300a/default.nix b/devices/gl-mt300a/default.nix index d5bd105..02f02f9 100644 --- a/devices/gl-mt300a/default.nix +++ b/devices/gl-mt300a/default.nix @@ -18,7 +18,7 @@ support into the kernel even if we're using TFTP root ''; - module = { pkgs, config, ...}: + module = { pkgs, config, lib, ...}: let inherit (pkgs.liminix.networking) interface; inherit (pkgs) openwrt; @@ -151,6 +151,8 @@ PARTITION_ADVANCED = "y"; PRINTK_TIME = "y"; + } // lib.optionalAttrs (config.system.service ? vlan) { + SWCONFIG = "y"; }; }; }; diff --git a/devices/gl-mt300n-v2/default.nix b/devices/gl-mt300n-v2/default.nix index dca648a..0b62e9c 100644 --- a/devices/gl-mt300n-v2/default.nix +++ b/devices/gl-mt300n-v2/default.nix @@ -11,7 +11,7 @@ }; }; - module = { pkgs, config, ...}: + module = { pkgs, config, lib, ...}: let inherit (pkgs.liminix.networking) interface; inherit (pkgs.liminix.services) oneshot; @@ -160,6 +160,8 @@ PARTITION_ADVANCED = "y"; PRINTK_TIME = "y"; + } // lib.optionalAttrs (config.system.service ? vlan) { + SWCONFIG = "y"; }; }; }; diff --git a/modules/vlan/default.nix b/modules/vlan/default.nix index 2d747ec..6698630 100644 --- a/modules/vlan/default.nix +++ b/modules/vlan/default.nix @@ -36,6 +36,5 @@ in }; config.kernel.config = { VLAN_8021Q = "y"; - SWCONFIG = "y"; # not always appropriate, some devices will use DSA }; }