lib: FINALLY (?) FIX THE INTERFACE CONUNDRUM
This commit is contained in:
parent
5e8c297d03
commit
ec70e43143
@ -35,15 +35,13 @@
|
||||
i18n.enable = true;
|
||||
singleUser = "alexander";
|
||||
hostName = "mashu";
|
||||
#wireless = true;
|
||||
wireless = true;
|
||||
primaryInterface = "wlp1s0";
|
||||
offloading.offload.enable = true;
|
||||
};
|
||||
hardware = {
|
||||
intel.enable = true;
|
||||
wifi = {
|
||||
enable = true;
|
||||
wifiInterface = "wlp1s0";
|
||||
};
|
||||
wifi.enable = true;
|
||||
mobile.enable = true;
|
||||
surface.enable = true;
|
||||
};
|
||||
|
@ -4,9 +4,7 @@ let
|
||||
network = import ./network.nix;
|
||||
isVM = config.ptw.system.isVM;
|
||||
wireless = config.ptw.system.wireless;
|
||||
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 = {
|
||||
@ -28,7 +26,7 @@ in {
|
||||
|
||||
ct state { established, related } accept
|
||||
iif lo accept
|
||||
iif ${primaryInterfaceWrapper} goto non-libvirt
|
||||
iif ${primaryInterface} goto non-libvirt
|
||||
'';
|
||||
};
|
||||
};
|
||||
@ -160,7 +158,7 @@ in {
|
||||
enable = true;
|
||||
};
|
||||
} // (if wireless then {
|
||||
wifiInterface = config.ptw.hardware.wifi.wifiInterface;
|
||||
wifiInterface = primaryInterface;
|
||||
} else {});
|
||||
|
||||
nix.package = pkgs.nixUnstable;
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user