diff --git a/hosts/mashu.nix b/hosts/mashu.nix index 357260a..bbe0eee 100644 --- a/hosts/mashu.nix +++ b/hosts/mashu.nix @@ -35,15 +35,13 @@ i18n.enable = true; singleUser = "alexander"; hostName = "mashu"; - #wireless = true; + wireless = true; + primaryInterface = "wlp1s0"; offloading.offload.enable = true; }; hardware = { intel.enable = true; - wifi = { - enable = true; - wifiInterface = "wlp1s0"; - }; + wifi.enable = true; mobile.enable = true; surface.enable = true; }; diff --git a/lib/baseSystem.nix b/lib/baseSystem.nix index 733429f..c1dff50 100644 --- a/lib/baseSystem.nix +++ b/lib/baseSystem.nix @@ -4,9 +4,7 @@ let network = import ./network.nix; isVM = config.ptw.system.isVM; wireless = config.ptw.system.wireless; - wifiInterface = lib.attrByPath [ "ptw" "hardware" "wifi" "wifiInterface" ] "" config; primaryInterface = lib.attrByPath [ "ptw" "system" "primaryInterface" ] "" config; - primaryInterfaceWrapper = if (wifiInterface != "" && primaryInterface == "") then wifiInterface else primaryInterface; in { time.timeZone = "Europe/Berlin"; ostylk.nftables = { @@ -28,7 +26,7 @@ in { ct state { established, related } accept iif lo accept - iif ${primaryInterfaceWrapper} goto non-libvirt + iif ${primaryInterface} goto non-libvirt ''; }; }; @@ -160,7 +158,7 @@ in { enable = true; }; } // (if wireless then { - wifiInterface = config.ptw.hardware.wifi.wifiInterface; + wifiInterface = primaryInterface; } else {}); nix.package = pkgs.nixUnstable; diff --git a/modules/hardware/wifi.nix b/modules/hardware/wifi.nix index 9ca8724..1073e76 100644 Binary files a/modules/hardware/wifi.nix and b/modules/hardware/wifi.nix differ