summary refs log tree commit diff
path: root/machines/wolfram
diff options
context:
space:
mode:
Diffstat (limited to 'machines/wolfram')
-rw-r--r--machines/wolfram/devices.nix40
1 files changed, 39 insertions, 1 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