From ab9333c2037c375820fe37d0b228d738987c8ad0 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Thu, 12 Sep 2024 20:15:09 -0400 Subject: [PATCH] Infini-SD: properly setup infiniband --- hosts/Infini-SD/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hosts/Infini-SD/default.nix b/hosts/Infini-SD/default.nix index 126f45f..070c631 100644 --- a/hosts/Infini-SD/default.nix +++ b/hosts/Infini-SD/default.nix @@ -31,9 +31,13 @@ }; }; - services.udev.extraRules = '' - DRIVER=="mlx4_core", ATTR{mlx4_port1}="eth", ATTR{mlx4_port2}="eth" - ''; + systemd.services.setup-infiniband = { + wantedBy = [ "network.target" ]; + script = '' + echo "eth" > /sys/bus/pci/devices/0000:04:00.0/mlx4_port1 + echo "eth" > /sys/bus/pci/devices/0000:04:00.0/mlx4_port2 + ''; + }; documentation.man.man-db.enable = false;