NixOS and music: Experiences?

What other apps and distros do you use to round out your studio?

Moderators: khz, MattKingUSA

Jeff Brown
Established Member
Posts: 33
Joined: Sun May 21, 2017 2:11 am

NixOS and music: Experiences?

Postby Jeff Brown » Sun Sep 15, 2019 6:14 pm

I'm tired of dependency hell doing music on Ubuntu. I've read a lot about NixOS and it sounds wonderful, but I don't know how much support for audio applications it provides. Has anybody here used it?

User avatar
Digital Larry
Established Member
Posts: 111
Joined: Thu Jan 09, 2014 5:25 am

Re: NixOS and music: Experiences?

Postby Digital Larry » Sun Sep 15, 2019 6:33 pm

I haven't used it, but I just did a search for jack and ardour and it has those. I did a search for low-latency (e.g. kernel) and didn't find anything. Maybe it doesn't matter in this day and age.

What exact "dependency hell" are you encountering? I added kxstudio repos to Ubuntu Studio and that's about all I needed to do.

I also set up a few packages so I could compile them, of course that is a more fun exercise in trying to get all the pieces pulled together.

User avatar
thetotalchaos
Established Member
Posts: 151
Joined: Mon Sep 29, 2014 8:29 pm
Contact:

Re: NixOS and music: Experiences?

Postby thetotalchaos » Sun Sep 15, 2019 10:47 pm

Jeff Brown wrote:I'm tired of dependency hell doing music on Ubuntu. I've read a lot about NixOS and it sounds wonderful, but I don't know how much support for audio applications it provides. Has anybody here used it?


Moving past Ubuntu is like the Linux variant of puberty. Every Linux user, who were around long enough, goes through that phase.
I personally am using Linux for 12 years, and Archlinux for 5 years now, but i have a separate Debian stable installation, for music production in particular. Because from my experience, the most important thing in choosing a distribution for audio production is stability. My instruments and tools must be solid and reliable, in order to the deal to work.
But i am interesting how NixOS is suitable for music production? What was that thing, that impress you, to conceder making music there, not on Ubuntu?
Is there such a thing at all? Or you just have the distro-hopping itch?
Check out my latest music album The girl with the stars in her eyes
https://totalchaos-music.bandcamp.com/album/the-girl-with-the-stars-in-her-eyes

Jeff Brown
Established Member
Posts: 33
Joined: Sun May 21, 2017 2:11 am

Re: NixOS and music: Experiences?

Postby Jeff Brown » Wed Sep 18, 2019 2:26 pm

I'm going to try running NixOS on a live disk and use a giant (128 Gb) USB stick as a hard drive, and see what I can get working.

> Why NixOS?

Its package manager is "purely functional", declarative. Rather than maintaining a mutable store of installed apps the way most things do -- which means installing a new thing can break an old thing -- you just specify what you would like to have, and it figures out all the dependencies itself. If anything's dependencies conflict with anything else's, you can have them both; it keeps them in separate spaces. You can have multiple versions of the same software installed, and use different things that depend on those different versions, at the same time.

> What exact "dependency hell" are you encountering?

Currently my system thinks JACK is dependency-broken (see errors at bottom of this post). I would try to manually recursively uninstall the components of the virtual package `jack-daemon` that's creating the conflict, but the last time I tried that I broke my window manager, and the time before that something went wrong too. When I try to install SuperCollider from source (necessary to get a recent version and sc-utils) `make` won't finish building, because the Link library (which I believe is to allow you to communicate with Ableton Live, which I don't even want to do) is looking for an "asio.hpp" file, which is Windows-specific. BitWig plays through my computer speakers even when everything else is playing through the external speakers. Ardour crashes as soon as I start it.

I reinstlaled Kubuntu four times and tried reinstalling everything from scratch in various different ways and I always end up with broken sound. Sometimes more important things break. Once the window manager was so broken I couldn't switch windows; I'd have to close an app to use the one behind it.

All I ever did to setup my sound, that I can remember, was add the KXStudio repos. I use a super-vanilla Dell Inspiron laptop and KUbuntu 18.04, precisely because I wanted everything as standard and well-supported as possible after earlier bad experiences on more obscure kit.

Code: Select all

jeff@jeff-Inspiron-5567:~$ apt-get -s install jackd1 jackd2
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
jackd2 is already the newest version (2:1.9.12+git20190321~zz~bionic1).
jackd2 set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 jackd1 : Depends: libjack0 (= 2:0.124.2~20151211-2~kxstudio1v5) but it is not going to be installed
          Conflicts: jack-daemon
 jackd2 : Conflicts: jack-daemon
          Recommends: jackd2-firewire but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

tavasti
Established Member
Posts: 837
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Contact:

Re: NixOS and music: Experiences?

Postby tavasti » Wed Sep 18, 2019 2:31 pm

thetotalchaos wrote:
Jeff Brown wrote:I'm tired of dependency hell doing music on Ubuntu. I've read a lot about NixOS and it sounds wonderful, but I don't know how much support for audio applications it provides. Has anybody here used it?


Moving past Ubuntu is like the Linux variant of puberty. Every Linux user, who were around long enough, goes through that phase.

Ok, matches my real life, I am most likely not ever going to grow up. Started with Slackware 1993, and ever since I have used linux both hobby and work use. I have been using Ubuntu more than 10 years.
Linux veteran & Novice musician

Hear my music at https://audiu.net/users/tawaste

User avatar
thetotalchaos
Established Member
Posts: 151
Joined: Mon Sep 29, 2014 8:29 pm
Contact:

Re: NixOS and music: Experiences?

Postby thetotalchaos » Wed Sep 18, 2019 5:15 pm

Jeff Brown wrote:

Code: Select all

jeff@jeff-Inspiron-5567:~$ apt-get -s install jackd1 jackd2
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
jackd2 is already the newest version (2:1.9.12+git20190321~zz~bionic1).
jackd2 set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 jackd1 : Depends: libjack0 (= 2:0.124.2~20151211-2~kxstudio1v5) but it is not going to be installed
          Conflicts: jack-daemon
 jackd2 : Conflicts: jack-daemon
          Recommends: jackd2-firewire but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


You are kidding right? I hope that you are kidding. You cannot have both jack1 and jack2 installed on a same system. Because they are variants of the same software. And you don't need them both. It is like having two versions of a VGA driver. No. Pick the one that works best for your needs. If you are not sure, just pick jack2!
Check out my latest music album The girl with the stars in her eyes
https://totalchaos-music.bandcamp.com/album/the-girl-with-the-stars-in-her-eyes

Jeff Brown
Established Member
Posts: 33
Joined: Sun May 21, 2017 2:11 am

Re: NixOS and music: Experiences?

Postby Jeff Brown » Wed Sep 18, 2019 5:29 pm

> You are kidding, right?

No, that would be a poor use of a forum like this. I never installed Jack 1 *or* Jack 2. Whatever I've got is what KXStudio installed for me, or whatever other things (Bitwig?) might have installed for themselves.

Had I been choosing ahead of time, obviously I would have chosen Jack 2. But unrolling a conflict like this has in my experience only ever broken my system. I ask what's in a virtual package, it lists a bunch of dependencies, I uninstall each of them, some of them are virtual, I recurse, and sooner or later the screen is on fire.

(Okay, there I'm kidding. But it's not a terrible metaphor.)

User avatar
CrocoDuck
Established Member
Posts: 1057
Joined: Sat May 05, 2012 6:12 pm
Contact:

Re: NixOS and music: Experiences?

Postby CrocoDuck » Wed Sep 18, 2019 5:34 pm

thetotalchaos wrote:You are kidding right? I hope that you are kidding. You cannot have both jack1 and jack2 installed on a same system.


Indeed, they conflict. As far as I know, NixOS would get around this though, as you will be able to boot into different snapshots, each one with its own applications. So, to be clear: there is no running jack1 and jack2 at the same time. If this is the goal of the OP, NixOS will not help.

NixOS can be declared to be a pro-audio system, see here. This includes kernel optimization and the application of the RT patch. A presentation about NixOS was given at the Linux Audio Conference in 2015.

The NixOS way might seem very intriguing, and indeed it is, but I think you will be facing a reality of recompiling the kernel from source at every update, if I understand how it works correctly. Also, I have the feeling that the system declaration needs to be properly maintained, and that one should organize the system snapshots properly to ensure a backup snapshot always exist.

I am not a NixOS expert. In fact, I am not too sure I am using the correct terminology either. I guess that my point is that NixOS appears to me as powerful as hard to master. Perhaps, a cleaner Ubuntu/Debian installation would do the job just as well.

Hope this helps
Check my Linux audio experiments on my SoundCloud.
Browse my AUR packages.
Fancying a swim in the pond?

Jeff Brown
Established Member
Posts: 33
Joined: Sun May 21, 2017 2:11 am

Re: NixOS and music: Experiences?

Postby Jeff Brown » Thu Sep 19, 2019 3:52 am

Mysteriously (to me), even though `apt-get -s install jackd1 jackd2` suggests I've got both versions half-installed, `apt-cache policy` does not:

Code: Select all

jeff@jeff-Inspiron-5567:~$ apt-cache policy jackd1
jackd1:                                                                                 
  Installed: (none)                                                                     
  Candidate: 2:0.124.2~20151211-2~kxstudio1v5                                                   
  Version table:                                                                               
     2:0.124.2~20151211-2~kxstudio1v5 500
        500 http://ppa.launchpad.net/kxstudio-debian/gcc5-deps/ubuntu xenial/main amd64 Packages
     2:0.124.2~20151211-2~kxstudio1 500
        500 http://ppa.launchpad.net/kxstudio-debian/libs/ubuntu trusty/main amd64 Packages
     1:0.125.0-3 500
        500 http://co.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
jackd2:
  Installed: 2:1.9.12+git20190321~zz~bionic1
  Candidate: 2:1.9.12+git20190321~zz~bionic1
  Version table:
 *** 2:1.9.12+git20190321~zz~bionic1 500
        500 http://ppa.launchpad.net/kxstudio-debian/ubuntus/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
     2:1.9.12+git20190321~kxstudio1v5 500
        500 http://ppa.launchpad.net/kxstudio-debian/gcc5/ubuntu xenial/main amd64 Packages
     2:1.9.12+git20190321~kxstudio1 500
        500 http://ppa.launchpad.net/kxstudio-debian/libs/ubuntu trusty/main amd64 Packages
     2:1.9.11+git20170722-1~kxstudio2v5 500
        500 http://ppa.launchpad.net/kxstudio-debian/gcc5-deps/ubuntu xenial/main amd64 Packages
     1.9.12~dfsg-2 500
        500 http://co.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages


> Perhaps, a cleaner Ubuntu/Debian installation would do the job just as well.

I think there's a solid chance you're right. I'm going to try Nix, though. I read some of the manual, and learned that after building a snapshot you can test it without making it the default, via `run nixos-rebuild test`. Seems pretty safe -- but it has a fearsome reputation, so who knows.

User avatar
Linuxmusician01
Established Member
Posts: 660
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland

Re: NixOS and music: Experiences?

Postby Linuxmusician01 » Thu Sep 19, 2019 9:52 am

Jeff Brown wrote:[...] I never installed Jack 1 *or* Jack 2. Whatever I've got is what KXStudio installed for me, or whatever other things (Bitwig?) might have installed for themselves. [...]

If you add a repository to your system (like you did w/ the KXStudio repo in your Ubuntu 18.04 system) it does not automatically install software by itself. You must do that yourself via your package manager (or by using the "sudo apt-get install" command).

Jeff Brown wrote:[...] Mysteriously (to me), even though `apt-get -s install jackd1 jackd2` suggests I've got both versions half-installed [...]

I'm afraid it does not suggest that (I've read the command line message you posted). I guess you're relatively new to Linux? That's perfectly fine, forums like these are for asking questions. But some of the things you assume are wrong.

Good luck with using and learning about Linux. :)

User avatar
CrocoDuck
Established Member
Posts: 1057
Joined: Sat May 05, 2012 6:12 pm
Contact:

Re: NixOS and music: Experiences?

Postby CrocoDuck » Thu Sep 19, 2019 10:07 am

Jeff Brown wrote:I think there's a solid chance you're right. I'm going to try Nix, though. I read some of the manual, and learned that after building a snapshot you can test it without making it the default, via `run nixos-rebuild test`. Seems pretty safe -- but it has a fearsome reputation, so who knows.


NixOS was build to be able to switch between different snapshots in a reliable and reproducible way. I think the fearsome reputation comes from the fact that it is a "power user" distro, that is, it needs you to be comfortable with understanding error messages from the console and editing conf files, as well as manually install your system from the command line, and do most maintenance from the command line as well. Kinda like Arch and Gentoo really, maybe a step above.

If you are new to Linux buckle up: it is gonna be a fun ride and you are facing a slow learning curve, slower than that of other distributions. I do not want to recommend against trying it: after all my first serious attempt with Linux was with Gentoo. Still, keep in mind that other distros are more approachable, and will give you good results if properly set up and maintained. Being NixOS quite a niche Linux distro, I think getting accustomed to other distros first will give you more transferable knowledge across the Linux landscape.

That said, if you go ahead with NixOS and musnix, please report on your experience! I am definitely interested in knowing how it goes.
Check my Linux audio experiments on my SoundCloud.
Browse my AUR packages.
Fancying a swim in the pond?

User avatar
Fmajor7add9
Established Member
Posts: 52
Joined: Sun Dec 31, 2017 3:56 am
Location: Might be moving to Montana soon
Contact:

Re: NixOS and music: Experiences?

Postby Fmajor7add9 » Thu Sep 19, 2019 2:06 pm

CrocoDuck wrote:NixOS can be declared to be a pro-audio system, see here. This includes kernel optimization and the application of the RT patch. A presentation about NixOS was given at the Linux Audio Conference in 2015.

The NixOS way might seem very intriguing, and indeed it is, but I think you will be facing a reality of recompiling the kernel from source at every update, if I understand how it works correctly.

Thanks for the musnix and LAC links, both helpful when trying to figure out NixOS.

I pulled down their .ova and had a look, the /nix/store with all the packages is 3.3gb out of 3.5gb total. So having self-dependant packages obviously increases disk space req. and I didn't eye a method for compartmentalizing that on first manual read. Could be handy to 'split' some out to other mounts or extract a minimal snapshot, like when you make an iso out of a running system.

Wondered about kernel updates also as it seems to be declarable in the config file as any other Nix package or config element:
https://nixos.org/nixos/manual/index.html#sec-upgrading
https://nixos.org/nixos/manual/index.ht ... nel-config

Wouldn't a kernel upgrade involve recompiling on any distro, updated rolling release or manually kicked off?

Or is it also one of the the points of NixOS to atomize everything incl. kernel builds, sort of like git, to quickly re-build, merge, branch back and forth?

CrocoDuck wrote:If you are new to Linux buckle up: it is gonna be a fun ride and you are facing a slow learning curve, slower than that of other distributions. I do not want to recommend against trying it: after all my first serious attempt with Linux was with Gentoo. Still, keep in mind that other distros are more approachable, and will give you good results if properly set up and maintained. Being NixOS quite a niche Linux distro, I think getting accustomed to other distros first will give you more transferable knowledge across the Linux landscape.

That said, if you go ahead with NixOS and musnix, please report on your experience! I am definitely interested in knowing how it goes.

Absolutely, it looks very promising for this purpose where so much trimming is involved, just editing a config file instead of rolling back by traditional install and repeating all the minor setup tasks every time. Takes precious time away from the music, really.

There are a few others out there now of same intriguing immutable ilk:
https://guix.gnu.org

Fedora Silverblue https://docs.fedoraproject.org/en-US/fe ... rblue/faq/

https://docs.fedoraproject.org/en-US/fedora-coreos/faq is based on Container Linux from https://coreos.com which Red Hat acquired and https://www.flatcar-linux.org forked out

- and the older slackware based distros can perhaps be used in a sort of similar way, with their compressed package modules or whatever it's called

Basslint
Established Member
Posts: 187
Joined: Sun Jan 27, 2019 2:25 pm
Location: Italy

Re: NixOS and music: Experiences?

Postby Basslint » Fri Sep 20, 2019 5:25 pm

Jeff Brown wrote:I'm tired of dependency hell doing music on Ubuntu. I've read a lot about NixOS and it sounds wonderful, but I don't know how much support for audio applications it provides. Has anybody here used it?


Forgive me the shameless plug but on openSUSE, we have a repo which uses an automatic build system which prevents many dependency problems, and we also have plenty of free music programs (thread here) :D
The community of believers was of one heart and mind, and no one claimed that any of his possessions was his own, but they had everything in common. [Acts 4:32]

Jamesf
Established Member
Posts: 17
Joined: Tue May 28, 2019 12:23 pm

Re: NixOS and music: Experiences?

Postby Jamesf » Fri Sep 27, 2019 8:29 am

Very happy Nixos user here.
Got into it for a similar reason: fed up with tracking down the cruft. Puppet and Ansible were good stabs at the problem, but inherently aren't complete, and thus don't prevent that wonderful moment of "whoops, I forgot I'd done that manually. How'd I do it, again?"
Musnix is a good thing, and I've built on top of that. I mostly use Ardour and Qjackctl, with various plugins for Ardour.

It was quite a learning curve initially, but it won me over completely when I b0rked my laptop's network configs, and fixed it with a simple rollback.

Guix has a similar aim, but doesn't quite stack up to Nixos.


Return to “Linux Distributions & Other Software”

Who is online

Users browsing this forum: No registered users and 2 guests