Building a Scarlett Focusrite Vocaster One Studio Kernel Module for NixOS

Hello! A work/fun in progress, I’m trying to build a derivation of a Scarlett Focusrite Vocaster One Studio module/driver GitHub - geoffreybennett/scarlett-gen2: Linux kernel source tree with additional Focusrite Scarlett and Clarett support ("Scarlett2 USB Protocol Mixer Driver") for NixOS so that I can start streaming. The author of the driver says that the driver has been submitted upstream, and that it should appear in Linux 6.10.

My early iteration is at scarlett2gen-nix/scarlett.nix at 23266a7e949d9ecca44db6414db5ed99b63ad119 · stablejoy/scarlett2gen-nix · GitHub along with a still basic default.nix.

I have been writing about it on my blog at Packaging a kernel module for NixOS (ongoing).

The build instructions from the Scarlett Readme are:

KSRCDIR=/lib/modules/$(uname -r)/build
make -j4 -C $KSRCDIR M=$(pwd) clean
make -j4 -C $KSRCDIR M=$(pwd)
sudo make -j4 -C $KSRCDIR M=$(pwd) INSTALL_MOD_DIR=updates/snd-usb-audio modules_install
sudo depmod

I’m finding about various ways users build their modules, and how nix does install phases are still unclear to me.


I didn’t plug in the cable correctly! So funny! It works now out of the box. So I can start streaming! So happy about streaming about NixOS.