I tried installing mopidy and mopidy-mpd using system package and home-manager, with both attempts resulting in failure . I found a reddit post having the same issue but the answer was deleted .
{ config, pkgs, ... }:
let
musicDir = "/mnt/c/Users/saumi/Music";
playlistsDir = "${musicDir}/playlists";
in
{
# TODO please change the username & home directory to your own
home.username = "abram";
home.homeDirectory = "/home/abram";
# link the configuration file in current directory to the specified location in home directory
# home.file.".config/i3/wallpaper.jpg".source = ./wallpaper.jpg;
# link all files in `./scripts` to `~/.config/i3/scripts`
# home.file.".config/i3/scripts" = {
# source = ./scripts;
# recursive = true; # link recursively
# executable = true; # make all files executable
# };
# encode the file content in nix configuration file directly
# home.file.".xxx".text = ''
# xxx
# '';
# Packages that should be installed to the user profile.
home.packages = with pkgs; [
# here is some command line tools I use frequently
# feel free to add your own or remove some of them
yazi
neovim
ncmpcpp
mopidy
mopidy-mpd
mopidy-local
mopidy-spotify
# utils
ripgrep # recursively searches directories for a regex pattern
jq # A lightweight and flexible command-line JSON processor
yq-go # yaml processor https://github.com/mikefarah/yq
eza # A modern replacement for ‘ls’
fzf # A command-line fuzzy finder
nmap # A utility for network discovery and security auditing
ipcalc # it is a calculator for the IPv4/v6 addresses
# misc
cowsay
file
which
tree
gnused
gnutar
gawk
zstd
gnupg
# nix related
#
# it provides the command `nom` works just like `nix`
# with more details log output
nix-output-monitor
# productivity
glow # markdown previewer in terminal
btop # replacement of htop/nmon
iotop # io monitoring
iftop # network monitoring
# system call monitoring
strace # system call monitoring
ltrace # library call monitoring
lsof # list open files
# system tools
sysstat
lm_sensors # for `sensors` command
ethtool
pciutils # lspci
usbutils # lsusb
];
services.mopidy = {
enable = true;
extensionPackages = with pkgs; [
mopidy-local
mopidy-mpd
];
settings = {
http = {
hostname = "0.0.0.0";
};
file = {
enabled = true;
media_dirs = [
"${musicDir}|Music"
];
};
m3u = {
enabled = true;
base_dir = musicDir;
playlists_dir = playlistsDir;
default_encoding = "utf-8";
default_extension = ".m3u8";
};
mpd = {
enabled = true;
hostname = "127.0.0.1";
port = "6600";
media_dir = [
"${musicDir}|Music"
];
};
};
};
programs.ncmpcpp = {
enable = true;
mpdMusicDir = musicDir;
};
programs.beets = {
enable = true;
settings = {
library = "${musicDir}/library.db";
plugins = [
"acousticbrainz"
"chroma"
"edit"
"export"
"fetchart"
"fromfilename"
"fuzzy"
"mbsync"
"playlist"
"scrub"
"smartplaylist"
];
ignore_hidden = true;
directory = musicDir;
ui.color = true;
import = {
move = true;
link = false;
resume = true;
incremental = true;
group_albums = true;
log = "beets.log";
};
match.ignore_video_tracks = true;
# Plugins configuration.
fuzzy.prefix = "-";
scrub.auto = true;
smartplaylist = {
relative_to = musicDir;
playlist_dir = playlistsDir;
playlists = [
{
name = "all.m3u8";
query = "";
}
{
name = "released-in-$year.m3u8";
query = "year:2000..2023";
}
];
};
};
};
# basic configuration of git, please change to your own
programs.git = {
enable = true;
userName = "Abram Paul";
userEmail = "erenyeaguh@protonmail.com";
};
# starship - an customizable prompt for any shell
programs.starship = {
enable = true;
# custom settings
settings = {
add_newline = false;
aws.disabled = true;
gcloud.disabled = true;
line_break.disabled = true;
};
};
# This value determines the home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new home Manager release introduces backwards
# incompatible changes.
#
# You can update home Manager without changing this value. See
# the home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "24.11";
# Let home Manager install and manage itself.
programs.home-manager.enable = true;
}
Running mopidy deps give this error
WARNING 2025-02-15 10:46:34,639 [6799:MainThread] mopidy.config
Ignoring config section 'mpd' because no matching extension was found
Executable: /nix/store/cm41ci1cg1d5mir49jcak8yycn1jsb7g-mopidy-3.4.2/bin/.mopidy-wrapped
Platform: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.40
Python: CPython 3.12.8 from /nix/store/0l539chjmcq5kdd43j6dgdjky4sjl7hl-python3-3.12.8/lib/python3.12
Mopidy: 3.4.2 from /nix/store/cm41ci1cg1d5mir49jcak8yycn1jsb7g-mopidy-3.4.2/lib/python3.12/site-packages
Pykka: 4.1.1 from /nix/store/x9a88l7l1svzkj9jim1xidmrifmpvk3r-python3.12-pykka-4.1.1/lib/python3.12/site-packages
requests: 2.32.3 from /nix/store/5vddc7y16hwydfspxxzv1mgacn2dsmyh-python3.12-requests-2.32.3/lib/python3.12/site-packages
charset-normalizer: 3.4.1 from /nix/store/fds6mmxqpig7lx7gwcc1rnifr08l496q-python3.12-charset-normalizer-3.4.1/lib/python3.12/site-packages
idna: 3.10 from /nix/store/m11bzq1nw0ji3dfhv85yvsfzi1imq5p4-python3.12-idna-3.10/lib/python3.12/site-packages
urllib3: 2.3.0 from /nix/store/qy45r3xw4wklb9apywz18fc7ijxvlk4w-python3.12-urllib3-2.3.0/lib/python3.12/site-packages
certifi: 2024.12.14 from /nix/store/q32lxxzd7dlyl27a3jb0rh3z5xyhxgq4-python3.12-certifi-2024.12.14/lib/python3.12/site-packages
setuptools: 75.8.0.post0 from /nix/store/awqs4f1vqa4z83rvngh58hncqhvafymm-python3.12-setuptools-75.8.0/lib/python3.12/site-packages
tornado: 6.4.2 from /nix/store/0fyffgvp6ssgnq3alq576r03jyjw2k24-python3.12-tornado-6.4.2/lib/python3.12/site-packages
GStreamer: 1.24.10.0 from /nix/store/vrjz3zk8f1r9zprc7mkn6789syblxci7-python3.12-pygobject-3.50.0/lib/python3.12/site-packages/gi
Detailed information:
Python wrapper: python-gi 3.50.0
Relevant elements:
Found:
uridecodebin
souphttpsrc
appsrc
alsasink
osssink
oss4sink
pulsesink
id3demux
id3v2mux
lamemp3enc
mpegaudioparse
mpg123audiodec
vorbisdec
vorbisenc
vorbisparse
oggdemux
oggmux
oggparse
flacdec
flacparse
shout2send
Not found:
flump3dec
mad