baseSystem: Fix issue with wifiInterface

This commit is contained in:
PapaTutuWawa 2021-11-04 17:55:26 +01:00
parent e9de019d8d
commit b561f69e70

View File

@ -4,7 +4,8 @@ let
network = import ./network.nix;
isVM = config.ptw.system.isVM;
wireless = config.ptw.system.wireless;
wifiInterface = config.ptw.system.wifi.wifiInterface;
hasWifiInterface = wireless && lib.hasAttr "wifi" config.ptw.system && lib.hasAttr "wifiInterface" config.ptw.system.wifi;
wifiInterface = if hasWifiInterface then config.ptw.system.wifi.wifiInterface else "";
primaryInterface = config.ptw.system.primaryInterface;
primaryInterfaceWrapper = if wifiInterface != "" && primaryInterface == "" then wifiInterface else primaryInterface;
in {