Navidrome
Navidrome is an open source web-based music collection server and streamer.
Basic usage
A minimal configuration with an existing music directory looks like this:
{
services.navidrome = {
enable = true;
settings = {
# This folder will be mounted with BindReadOnlyPaths
MusicFolder = "/mnt/share/music";
};
};
}
This will start the Navidrome service on the default port (4533) and start
scanning your music folder to build the library.
Configuration Options
Navidrome's documentation lists all the available
options
for configuring your service. The services.navidrome.settings option generates
a JSON file which should serve for nearly all the options. Some defaults are
already in place in the module (such as opting out of Anonymous Data
Collection) be sure to
consult the defaults for more information.
Secrets
You may have some secret values that you do not want exposed in the Nix store.
Most configuration values in Navidrome have Environment Variable alternatives
(start with ND_ see the docs for more). Create a secret file and set
services.navidrome.environmentFile with the path, Navidrome's systemd unit
will source this before launching.
Plugins
Navidrome supports externally created
plugins. Some of these
already exist in Nixpkgs and builders exist for Rust (pkgs.buildNavidromeRustPlugin) and Go (pkgs.buildNavidromeGoPlugin). Plugins are compiled to WASM so you must reference them using pkgsCross instead of directly from pkgs, like so: pkgs.pkgsCross.wasi32.navidromePlugins.<name>. An example of adding plugins to a Navidrome configuration is as follows:
{
services.navidrome = {
enable = true;
plugins = with pkgs.pkgsCross.wasi32.navidromePlugins; [
listenbrainz-daily-playlist
lyrics-plugin
];
settings = {
MusicFolder = "/mnt/share/music";
};
};
}