lib: Fix nftables when using wireless

This commit is contained in:
PapaTutuWawa 2021-11-04 23:51:56 +01:00
parent ba27ecb9c2
commit d29e35ba91

View File

@ -4,10 +4,9 @@ let
network = import ./network.nix; network = import ./network.nix;
isVM = config.ptw.system.isVM; isVM = config.ptw.system.isVM;
wireless = config.ptw.system.wireless; wireless = config.ptw.system.wireless;
hasWifiInterface = wireless && lib.hasAttr "wifi" config.ptw.system && lib.hasAttr "wifiInterface" config.ptw.system.wifi; wifiInterface = lib.attrByPath [ "ptw" "hardware" "wifi" "wifiInterface" ] "" config;
wifiInterface = if hasWifiInterface then config.ptw.system.wifi.wifiInterface else ""; primaryInterface = lib.attrByPath [ "ptw" "system" "primaryInterface" ] "" config;
primaryInterface = if lib.hasAttr "primaryInterface" config.ptw.system then config.ptw.system.primaryInterface else ""; primaryInterfaceWrapper = if (wifiInterface != "" && primaryInterface == "") then wifiInterface else primaryInterface;
primaryInterfaceWrapper = if wifiInterface != "" && primaryInterface == "" then wifiInterface else primaryInterface;
in { in {
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
ostylk.nftables = { ostylk.nftables = {
@ -36,7 +35,7 @@ in {
}; };
networking = { networking = {
useDHCP = false; # Done by the network manager useDHCP = false; # Done by the network manager
networkmanager.enable = false; networkmanager.enable = true;
#interfaces.*.useDHCP = false; #interfaces.*.useDHCP = false;
@ -104,8 +103,6 @@ in {
]; ];
services = { services = {
connman.enable = true;
# TODO: Is this correct? Maybe run once # TODO: Is this correct? Maybe run once
timesyncd.enable = false; timesyncd.enable = false;