Nixtune: A Raspberry Pi Audio Player built with Purescript, Haskell, and Nix

I’m building a (kind of) Moode Pi Radio with hardware DAC replacement that uses Purescript, Halogen, and Haskell glued together with Nix flakes. Check out the latest changes here (this branch has every multiroom feature crammed into one and won’t restrict you to using the hardware DAC I’m using like all other branches at the moment) GitHub - harryprayiv/nixtune at multiroom-canonical · GitHub

Having built like ten projects using Purescript, Nix, and Haskell, I’m really starting to settle into a canonical style where things fit together well.

I think this project will interest people because I’ve been working on multiroom audio using a patched/extended/overlayed dev branch of sendspin, secure connections and multiroom timing using using sops (to prevent hikacking the stream) and Haskell, and of course gluing it all together with nix flakes.

This branch compiles but I didn’t have time to actually test it on machines before I left for Japan. It should be documented enough for anyone to spin up their own nixtune machine.

The single room mode player is a pretty standard MPD player but it does have one killer feature: you can rip YouTube video into audio by simply pasting a YouTube url in on the queue page and that audio file will land in the MPD queue AND download that song to your library. I’m sure I’ll have to rewrite it soon as the arms race between yt-dlp and Google carries on. But it’s a pretty cool feature I hadn’t seen anywhere else.

Edit: figured I’d be the change I want to see in the world and make a post rather than loudly lament the bot spam.

1 Like