lib: Fix primaryInterface usage

This commit is contained in:
PapaTutuWawa 2021-11-04 21:26:48 +01:00
parent 71393a906c
commit 6617feea17

View File

@ -6,7 +6,7 @@ let
wireless = config.ptw.system.wireless;
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;
primaryInterface = if lib.hasAttr "primaryInterface" config.ptw.system then config.ptw.system.primaryInterface else "";
primaryInterfaceWrapper = if wifiInterface != "" && primaryInterface == "" then wifiInterface else primaryInterface;
in {
time.timeZone = "Europe/Berlin";