How to Install Lidarr on NixOS Latest
This tutorial will guide you through the installation of Lidarr on NixOS Latest. Lidarr is a music collection manager that allows you to automatically download new songs from your preferred music sources, wake up on demand to perform scheduled tasks, and perform tagging and renaming of music files.
1. Update your system
Before installing Lidarr, it's important to make sure your system is up-to-date. You can do this by running the following command:
sudo nix-channel --update
sudo nixos-rebuild switch
2. Install Lidarr
Now that your system is up-to-date, you can install Lidarr using the following steps:
First, create a new file called "lidarr.nix" in your preferred working directory. You can do this by running the following command:
touch lidarr.nixOpen the "lidarr.nix" file using your preferred text editor.
Copy and paste the following code into the "lidarr.nix" file:
{ pkgs ? import <nixpkgs> {} }: let mono = pkgs.monoPackages.latest; in pkgs.mkShell { name = "lidarr"; buildInputs = with pkgs; [ mono icu libmediainfo python3 python3Packages.requests python3Packages.autobahn python3Packages.service_identity python3Packages.twisted python3Packages.pysetuptools ]; shellHook = '' export XDG_CONFIG_HOME=$HOME/.config export LANG=C.UTF-8 export LC_ALL=C.UTF-8 ''; }This code will create a Nix shell that includes all the necessary dependencies to run Lidarr.
Save and close the "lidarr.nix" file.
Run the following command to build the Lidarr environment:
nix-shell lidarr.nixOnce the environment is built, run the following command to download and extract the latest version of Lidarr:
curl -L "https://github.com/lidarr/Lidarr/releases/latest/download/Lidarr.develop.${monoversion}.linux.tar.gz" | tar xzNote: Make sure to replace "monoversion" with your NixOS version number (for example, "monoversion=6.12.0.90").
Start Lidarr by running the following command:
mono Lidarr/Lidarr.exe
Congratulations! You have successfully installed Lidarr on NixOS Latest. You can now use Lidarr to manage your music collection.