NixOS and Linux (Pro) Audio


#1

This is a thread about using audio software on NixOS.

To use Jack without xruns, add the following to configuration.nix:

  security.pam.loginLimits = [
    { domain = "@audio"; item = "memlock"; type = "-"; value = "unlimited"; }
    { domain = "@audio"; item = "rtprio"; type = "-"; value = "99"; }
    { domain = "@audio"; item = "nofile"; type = "soft"; value = "99999"; }
    { domain = "@audio"; item = "nofile"; type = "hard"; value = "99999"; }
  ];

And add yourself to the audio group.


#2

I’ve created a nix file for Carla: https://gist.github.com/suhr/912c714c9ac73ccfc0d52303e1caeb7c

At a standalone app it works great. But when I try to use it as a VST plugin in Helio, it cannot find PyQt5.

How can I fix that problem?


#3

I recommend creating a Python 3 environment, and using that in buildInputs.

pythonEnv = python3.withPackages(ps: with ps; [ pyliblo pyqt5 ])

If there are shebangs in the scripts, then they should be rewritten to the path of the Python in this env.


#4

Thanks! Though instead of PyQt5 problem I have now this: Could not initialize GLX.

Standalone version works as usually.


#5

Maybe you cannot find your opengl libraries? LD_DEBUG=libs <your command> might help. Otherwise strace -f <command> might show if it tries to access some devices or so.


#6

would be great if you could make a PR to have carla upstream.


#7

Nixpkgs PR process is rather slow, so I’m going to make an overlay first.

By the way, this is a nix file for Helio (git): https://gist.github.com/suhr/1eb9b2d4d9539c130ff8a28e6beb3ba2


#8

thanks for the info ! nd packages :loud_sound::loud_sound::loud_sound:

btw have you heard of musnix? RT audio in NixOS config ect.


#9

i guess the overlay
could be added to NUR ?
link: Introducing NUR - the Nix User Repostory || Share all your nix expressions!


#10

could be added to NUR ?

If I figure out how to use it, then why not.


#11

I created a nur repository with packages: https://github.com/suhr/nur-packages

Also, there’s an issue for Carla: https://github.com/falkTX/Carla/issues/813. By the way, removing /run/current-system/sw/lib from LD_LIBRARY_PATH revealed an another issue: Carla cannot find libjack2.so.0.