diff --git a/machines/back.nix b/machines/back.nix index 9618f90..56f4c4a 100644 --- a/machines/back.nix +++ b/machines/back.nix @@ -69,4 +69,14 @@ }; services.openssh.settings.AllowUsers = [ "backup" ]; + + systemd.services.switch-mlx4-ports-to-eth = { + serviceConfig.Type = "oneshot"; + description = "switch Mellanox ConnectX-3 Pro ports to ethernet mode"; + 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 + ''; + wantedBy = [ "multi-user.target" ]; + }; }