From cd1f502ecc8aa0919feac737f6be447f0d7dead5 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Tue, 13 Jan 2026 14:23:42 +0100 Subject: [PATCH 1/2] Allow user USB access to FTDI device in tent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Aleix Boné --- m/module/tc1-board.nix | 15 +++++++++++++++ m/tent/configuration.nix | 1 + 2 files changed, 16 insertions(+) create mode 100644 m/module/tc1-board.nix diff --git a/m/module/tc1-board.nix b/m/module/tc1-board.nix new file mode 100644 index 00000000..fd1f8c72 --- /dev/null +++ b/m/module/tc1-board.nix @@ -0,0 +1,15 @@ +{ lib, pkgs, ... }: + +{ + # Allow user access to FTDI USB device + services.udev.packages = lib.singleton (pkgs.writeTextFile { + # Needs to be < 73 + name = "60-ftdi-tc1.rules"; + text = '' + # Bus 003 Device 003: ID 0403:6011 Future Technology Devices International, Ltd FT4232H Quad HS USB-UART/FIFO IC + # Use := to make sure it doesn't get changed later + SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", MODE:="0666" + ''; + destination = "/etc/udev/rules.d/60-ftdi-tc1.rules"; + }); +} diff --git a/m/tent/configuration.nix b/m/tent/configuration.nix index a165b6bc..2b7f3f42 100644 --- a/m/tent/configuration.nix +++ b/m/tent/configuration.nix @@ -16,6 +16,7 @@ ../module/p.nix ../module/vpn-dac.nix ../module/hut-substituter.nix + ../module/tc1-board.nix ]; # Select the this using the ID to avoid mismatches -- 2.51.2 From deb0cd1488b8d72ad1395b25aa4dbbdf721274d9 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Tue, 13 Jan 2026 16:09:22 +0100 Subject: [PATCH 2/2] Allow USB access to TC1 from Gitlab Runner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Aleix Boné --- m/module/tc1-board.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/m/module/tc1-board.nix b/m/module/tc1-board.nix index fd1f8c72..a513860f 100644 --- a/m/module/tc1-board.nix +++ b/m/module/tc1-board.nix @@ -12,4 +12,16 @@ ''; destination = "/etc/udev/rules.d/60-ftdi-tc1.rules"; }); + + # Allow access to USB for docker in GitLab runner + services.gitlab-runner = { + services.gitlab-bsc-docker = { + registrationFlags = [ + # We need raw access to the USB port to reboot the board + "--docker-devices /dev/bus/usb/003/003" + # And TTY access for the serial port + "--docker-devices /dev/ttyUSB2" + ]; + }; + }; } -- 2.51.2