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;
isVM = config.ptw.system.isVM;
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 = if lib.hasAttr "primaryInterface" config.ptw.system then config.ptw.system.primaryInterface else "";
primaryInterfaceWrapper = if wifiInterface != "" && primaryInterface == "" then wifiInterface else primaryInterface;
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 = {
@ -36,7 +35,7 @@ in {
};
networking = {
useDHCP = false; # Done by the network manager
networkmanager.enable = false;
networkmanager.enable = true;
#interfaces.*.useDHCP = false;
@ -104,8 +103,6 @@ in {
];
services = {
connman.enable = true;
# TODO: Is this correct? Maybe run once
timesyncd.enable = false;