this one has also been fun to make, but again i hit roadblock on something i can get it to signin and fetch playlists from youtube, but i cant get it to actually play anyhting. also on defaults it gets small ammount of playlist and albums and i have tried to add extra configs to up these, but then everyhting brakes. pointers are welcome to where i am hitting the wall.
here is my music.nix file for that
{ pkgs, config, ... }:
{
# 1. NCMPCPP remains the same
programs.ncmpcpp = {
enable = true;
package = pkgs.ncmpcpp.override { visualizerSupport = true; };
settings = {
ncmpcpp_directory = "${config.home.homeDirectory}/.config/ncmpcpp";
lyrics_directory = "${config.home.homeDirectory}/.config/ncmpcpp/lyrics";
mpd_host = "127.0.0.1";
mpd_port = "6600";
mpd_connection_timeout = 60;
visualizer_data_source = "/tmp/mpd.fifo";
visualizer_output_name = "my_fifo";
visualizer_in_stereo = "yes";
visualizer_type = "ellipse";
visualizer_look = "●●";
playlist_display_mode = "columns";
browser_display_mode = "columns";
user_interface = "alternative";
autocenter_mode = "yes";
centered_cursor = "yes";
mouse_support = "yes";
};
};
# 2. THE SERVER (MOPIDY)
services.mopidy = {
enable = true;
extensionPackages = with pkgs.mopidyPackages; [
mopidy-youtube
mopidy-ytmusic
mopidy-mpd
mopidy-mpris
];
settings = {
core = { restore_state = true; };
audio = {
output = "tee name=t ! queue ! audioresample ! audioconvert ! pulsesink t. ! queue ! audio/x-raw,rate=44100,channels=2,format=S16LE ! filesink location=/tmp/mpd.fifo";
};
mpd = {
enabled = true;
hostname = "127.0.0.1";
port = 6600;
# REMOVED listall_enabled as it was causing the "Disabled extension" error
connection_timeout = 300;
};
ytmusic = {
enabled = true;
auth_json = "/home/phatle/.config/mopidy/ytmusic/auth.json";
oauth_json = "/home/phatle/.config/mopidy/ytmusic/auth.json";
# This forces a different stream type that sometimes bypasses pytube's signature check
bitrate = 128;
};
youtube = {
enabled = true;
youtube_dl_package = "yt_dlp";
autoplay_enabled = false;
};
};
};
home.packages = [ pkgs.yt-dlp pkgs.mpc ];
}