How to Install Mopidy on nixOS Latest
In this tutorial, we will walk through the steps to install Mopidy on nixOS Latest. Mopidy is an extensible music server written in Python. It plays music from local disk, Spotify, SoundCloud and many other streaming services.
Prerequisites
- A computer running nixOS Latest
- Administrative access to the computer
Step 1: Install Mopidy
Run the terminal and update the nixOS package manager by typing
sudo nix-channel --updateInstall Mopidy by running this command:
sudo nix-env -i mopidyThe installation will take a few minutes. Once completed, verify the latest version of Mopidy installed by running the command below in the terminal:
mopidy --version
Step 2: Configure Mopidy
Create the configuration file for Mopidy by running the following command:
touch ~/.config/mopidy/mopidy.confOpen the configuration file using a text editor of choice:
nano ~/.config/mopidy/mopidy.confInside the configuration file, add the following content:
[audio] output = autoaudiosink [spotify] username = <your spotify username> password = <your spotify password>Replace the
usernameandpasswordfields with your personal Spotify account credentials.Note: If you don't have Spotify Premium, you don't need to fill in the Spotify section of the configuration file.
Save and close the configuration file using
Ctrl + OandCtrl + X.
Step 3: Start Mopidy
Start Mopidy by running the following command:
mopidyIf all goes well, Mopidy should start playing your local music library or random tracks from the supported streaming services.
Note: If you want to stop Mopidy, press
Ctrl + Cin the terminal.
Conclusion
Congratulations, you have successfully installed Mopidy on nixOS Latest! Enjoy listening to your favorite music streaming services!