diff options
| -rw-r--r-- | machines/wolfram/devices.nix | 40 | ||||
| -rw-r--r-- | modules/wireless.nix | 22 |
2 files changed, 48 insertions, 14 deletions
diff --git a/machines/wolfram/devices.nix b/machines/wolfram/devices.nix index bd3a07e..fa695c4 100644 --- a/machines/wolfram/devices.nix +++ b/machines/wolfram/devices.nix @@ -47,7 +47,45 @@ enable = true; algorithm = "zstd"; swapDevices = 1; - memoryPercent = 50; + memoryPercent = 50; + }; + + networking = { + useDHCP = false; + dhcpcd.enable = false; + }; + systemd.network = { + enable = true; + networks = { + # ethernet through the rtl8125 ethernet controller (supports 2.5g) + "10-ether" = { + name = "enp7s0"; + DHCP = "yes"; + }; + # wifi connection via mediatek mt7921k (supports wifi 6e) + "10-wlan" = { + name = "wlp6s0"; + DHCP = "yes"; + networkConfig.IgnoreCarrierLoss = "3s"; + # authentication handled via wpa_supplicant in modules/wireless.nix + }; + }; + + # the rtl8125 notoriously has extreme issues with offloaded calculations + # sent from linux machines, and corrupts packets badly, crippling connectivity. + # we disable most forms of offloading to the chip here, instead handling them + # in our own kernel. this fixes most of the issues. + links."10-rtl8125-hardware-offloading" = { + matchConfig.Name = "enp7s0"; + linkConfig = { + ReceiveChecksumOffload = false; # rx off + TransmitChecksumOffload = false; # tx off + TCPSegmentationOffload = false; # tso off + TCP6SegmentationOffload = false; # tso off (ipv6) + GenericSegmentationOffload = false; # gso off + GenericReceiveOffload = false; # gro off + }; + }; }; # storage diff --git a/modules/wireless.nix b/modules/wireless.nix index 89d8b65..beb0955 100644 --- a/modules/wireless.nix +++ b/modules/wireless.nix @@ -5,21 +5,17 @@ file = ../secrets/wireless-secrets.age; }; - networking = { - useDHCP = true; + networking.wireless = { + enable = true; - wireless = { - enable = true; + # force wpa_supplicant to use all wlan interfaces + interfaces = lib.mkForce [ ]; - # force wpa_supplicant to use all wlan interfaces - interfaces = lib.mkForce [ ]; - - secretsFile = config.age.secrets.wireless-secrets.path; - networks = { - # yea this is my home network :3 - # (my boyfriends brother picked the name) - "Das asoziale Netzwerk".pskRaw = "ext:psk_home"; - }; + secretsFile = config.age.secrets.wireless-secrets.path; + networks = { + # yea this is my home network :3 + # (my boyfriends brother picked the name) + "Das asoziale Netzwerk".pskRaw = "ext:psk_home"; }; }; } |
