Hello,
I am using nixos with flakes and home-manager
I’m trying to set up RMPC, so I installed mpd as well
I now have my library showing up correctly in RMPC, but whenever I press enter to select a song it says [paused]
at the top of the screen, and no music of course
There’s also the following error message when I try to increase or decrease the volume:
MpdError: 'Cannot execute command: 'volume'. Detail: 'No mixer'. Reason: 'system error'. Cmd idx: '0'''
(I don’t really care about being able to set the volume from there, but it might hint at the source of the other issue)
To make sure this was a MPD issue, I installed ncmpcpp as well, and there as well the song doesn’t play, and is stuck as paused
Here is the relevant part of my home.nix:
{
config,
pkgs,
pkgs-unstable,
username,
fullname,
hostname,
...
}:
{
# <unrelated config here>
services.mpd = {
enable = true;
musicDirectory = "/home/${username}/Music";
extraConfig = ''
audio_output {
type "alsa"
name "My ALSA"
device "hw:0,0" # optional
format "44100:16:2" # optional
mixer_type "hardware"
mixer_device "default"
mixer_control "PCM"
}
'';
};
programs.rmpc = {
enable = true;
config = ''
(
address: "127.0.0.1:6600",
password: None,
theme: None,
cache_dir: None,
on_song_change: None,
volume_step: 5,
max_fps: 30,
scrolloff: 0,
wrap_navigation: false,
enable_mouse: true,
enable_config_hot_reload: true,
browser_song_sort: [Disc, Track, Artist, Title],
)
'';
};
programs.ncmpcpp = {
enable = true;
};
}
I would appreciate some help as I really wanted to try it out !
In the meantime, I’ll use termusic
Edit:
Solution
The device was set to something that doesn’t exist on my machine, removing these optional lines fixed it:
{
config,
pkgs,
pkgs-unstable,
username,
fullname,
hostname,
...
}:
{
# <unrelated config here>
services.mpd = {
enable = true;
musicDirectory = "/home/${username}/Music";
extraConfig = ''
audio_output {
type "alsa"
name "My ALSA"
mixer_type "hardware"
mixer_device "default"
mixer_control "PCM"
}
'';
};
programs.rmpc = {
enable = true;
config = ''
(
address: "127.0.0.1:6600",
password: None,
theme: None,
cache_dir: None,
on_song_change: None,
volume_step: 5,
max_fps: 30,
scrolloff: 0,
wrap_navigation: false,
enable_mouse: true,
enable_config_hot_reload: true,
browser_song_sort: [Disc, Track, Artist, Title],
)
'';
};
}
The mixer still doesn’t work, but I’ll figure this out another day