Hey everyone,
I’m pulling my hair out here over something I’ve been fighting to try and get mopidy to work in NixOS 22.05 with wireplumber.
I am starting mopidy as a service with the following config:
Mopidy
services.mopidy = {
enable = true;
extensionPackages = with pkgs; [ mopidy-local mopidy-mpd mopidy-podcast mopidy-tunein mopidy-youtube mopidy-ytmusic ];
configuration = ''
[audio]
mixer = software
mixer_volume =
output = autoaudiosink
buffer_time =
[core]
cache_dir = $XDG_CACHE_DIR/mopidy
config_dir = $XDG_CONFIG_DIR/mopidy
data_dir = $XDG_DATA_DIR/mopidy
max_tracklist_length = 10000
restore_state = true
#[jellyfin]
#hostname = 192.168.1.105:8096
#username = ${mySecrets.mopidy.jellyfin.username}
#password = ${mySecrets.mopidy.jellyfin.passwd}
[file]
enabled = true
media_dirs = /tmp/Music
excluded_file_extensions =
.jpg
.html
.mp4
.mpg
.nfo
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000
[local]
enabled = true
media_dir = /tmp/Music
data_dir = $HOME/Music/data
scan_timeout = 1000
excluded_file_extensions =
.html
.mp4
.mpg
.nfo
[logging]
color = true
console_format = %(levelname)-8s %(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n
debug_file = mopidy.log
verbosity = 4
[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD Server on $hostname
command_blacklist =
default_playlist_scheme = m3u
# [spotify]
# enabled = true
# username = deep_6
# password = ${mySecrets.mopidy.spotify.passwd}
# client_id = ${mySecrets.mopidy.spotify.client_id}
# client_secret = ${mySecrets.mopidy.spotify.client_secret}
[tunein]
enabled = false
timeout = 5000
[youtube]
enabled = false
youtube_api_key = ${mySecrets.mopidy.youtube.api_key}
api_enabled = true
musicapi_enabled = true
search_results = 50
playlist_max_videos = 1
[ytmusic]
enabled = true
auth_json = /tmp/auth.json
'';
};
I am enabling audio as follows:
Enable sound.
#{{{
sound.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
jack.enable = false;
};
environment.etc = {
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
bluez_monitor.properties = {
[“bluez5.enable-sbc-xq”] = true,
[“bluez5.enable-msbc”] = true,
[“bluez5.enable-hw-volume”] = true,
[“bluez5.headset-roles”] = “[ hsp_hs hsp_ag hfp_hf hfp_ag ]”
}
'';
"wireplumber/access.configuration.lua/50-default-access-config.lua".text = ''
matches = {
{
{ "pipewire.access", "=", "ncmpcpp" },
},
},
default_permission = "rx",
'';
};
I’m able to run the following and hear the beep
gst-launch-1.0 audiotestsrc ! audioresample ! autoaudiosink
I should also note sound works everywhere else, and when I’ve done some troubleshooting by using nix-shell -p mopidy and mopidy-* plugins and used the exact same configuration it works.
Yet I have no sound whatsoever when I try to run mopidy here’s some debug info:
I have also toggled to make sure it’s not a mute issue
My debug log is located here:
I suspect some sort of permissions issue, but I can’t solve it though I tried with the “wireplumber/access.configuration.lua/50-default-access-config.lua”.text = ‘’
portion