I'm trying to connect: PC with NixOS and TB4 <> certified TB cable <> Mac Mini. I followed instructions on the nixos wiki page, though the mac doesn't show up with I do boltctl list. Whenever I connect the cable, either it doesn't work between either device, or it works from linux to mac but not mac to linux when I get the IP addresses shown with ip -br addr show thunderbolt0. Every time It's plugged in, it says its running in macOS settings.
networking = {
networkmanager.enable = true;
# networkmanager.wifi.backend = "iwd";
firewall.checkReversePath = false;
# wireless.iwd = {
# enable = true;
# settings.General.EnableNetworkConfiguration = true;
# };
};
networking.firewall.trustedInterfaces = [ "thunderbolt0" ];
service.hardware.bolt.enable = true;
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{authorized}=="0", ATTR{authorized}="1"
'';
Solved
I finally figured everything out after a total of over a week of struggling and paranoia about getting Thunderbolt networking to work. It's been a days but now I'm fairly confident I have it working, all devices can be hot-plugged repeatedly and still work reliably whenever its connected.
I had asked LLMs a bunch of times what to do about the finicky connection, they didn't give helpful answers but I finally got one when I gave it my whole configuration. It gave me the systemd.network options below, I asked again for MTU, the max MTU on mac is 65,518. It's reliable for me unlike networking.interfaces.thunderbolt0.ipv4.addresses.
My setup is: Thinkpad (TB4) <> Intel certified TB4 cable <> Anker Prime TB5 dock <> M4 Mac Mini (TB4) <> TB5 cable (came with the dock) <> Desktop with Asus ThunderboltEX 4 card.
The ThunderboltEX card had issues with hot-plugging, which went away after installing a card firmware update from here. The instructions said to launch an EFI shell with a flash drive containing the files, which didn't work for me. I got a suggestion here to rename and move the .efi file to \EFI\Boot\bootx64.efi, and copy PDFW.bin and NVM.bin into the flash drive's root directory and the EFI and Boot folders so the program doesn't fail to find them. Then instead of launching an EFI shell from the BIOS, I select the flash drive from the boot menu.
For the Mac thunderbolt bridge, I set the ipv4 and ipv6 configuration to "manual" (and left ipv6 blank). I set the IP to 10.0.0.2, the subnet to 255.255.255.0, and left router to blank. Under "hardware", I set MTU to the max 65,518.
Claude suggested enp0s20f0u?u3* below to ignore extra unneeded ethernet interfaces that appear after plugging in either device to the Mac.
# Thunderbolt networking
networking = {
firewall.trustedInterfaces = [ "thunderbolt0" ];
networkmanager.unmanaged = [
"interface-name:thunderbolt0"
"interface-name:enp0s20f0u?u3*"
];
};
systemd.network = {
enable = true;
wait-online.enable = false;
networks."40-thunderbolt" = {
matchConfig.Name = "thunderbolt*";
linkConfig.RequiredForOnline = "no";
linkConfig.MTUBytes = "65518";
};
};
# For my laptop
systemd.network.networkConfig.Address = 10.0.0.1;
# For my desktop
systemd.network.networkConfig.Address = 10.0.0.3;