summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2026-03-16 15:37:01 +0100
committerMel <mel@rnrd.eu>2026-03-16 20:51:39 +0100
commit58a9b41ddbdcf397580a8ba0df87a971221e3845 (patch)
tree8824fd8a5a32e7c681bc11d0f8fb7c01a744d73a
parent136684919f101ce00b726f41c15cf8625dbfd8ba (diff)
downloadminerals-58a9b41ddbdcf397580a8ba0df87a971221e3845.tar.zst
minerals-58a9b41ddbdcf397580a8ba0df87a971221e3845.zip
Configure Wolfram network with systemd-networkd and disable hardware offloading for RTL8125
Signed-off-by: Mel <mel@rnrd.eu>
-rw-r--r--machines/wolfram/devices.nix40
-rw-r--r--modules/wireless.nix22
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";
};
};
}