From b561f69e70fd0e13c72b4dbb3bb7016791e1d9ea Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Thu, 4 Nov 2021 17:55:26 +0100 Subject: [PATCH] baseSystem: Fix issue with wifiInterface --- lib/baseSystem.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/baseSystem.nix b/lib/baseSystem.nix index b9dab8f..9114d11 100644 --- a/lib/baseSystem.nix +++ b/lib/baseSystem.nix @@ -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 {