Hello,
I’m running NixOS on SBC with some GPIO pins exposed to tinkering (Radxa Rock 5B) and I would like to utilize them for my project.
I have libgpiod
installed along with gpio-utils
through configuration.nix file. On official documentation here I found out that there should be gpioctl command available but I can see only these:
gpiodetect gpio-hammer gpionotify
gpio-event-mon gpioinfo gpioset
gpioget gpiomon gpio-watch
searching for additional packages did not give me any straight forward answer as well as nix issues.
Am I missing something or are those tools not available at the moment?
Some information about my system:
- Radxa Rock 5B 16GB
- Bootloader: EDK2 in DeviceTree mode
- NixOS 25.05
- kernel 6.15:
Linux Rock5B 6.15.0 #1-NixOS SMP Sun May 25 23:09:23 UTC 2025 aarch64 GNU/Linux
hardware-configuration.nix:
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "usb_storage" "usbhid" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enP4p65s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}
And configuration.nix:
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
# GPU enable
hardware.graphics = {
enable = true;
};
If any additional information are needed, please let me know. I am completely new to Nix so I don’t know if I provided enough/correct info.
Thank you in advance