67 lines
1.5 KiB
Nix
67 lines
1.5 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
services.mpd = {
|
|
enable = true;
|
|
musicDirectory = "~/Nextcloud/Musique";
|
|
network.listenAddress = "any";
|
|
extraConfig = ''
|
|
zeroconf_enabled "no"
|
|
|
|
restore_paused "yes"
|
|
replaygain "track"
|
|
|
|
audio_output {
|
|
type "pulse"
|
|
name "pulse"
|
|
}
|
|
|
|
audio_output {
|
|
type "fifo"
|
|
name "fifo"
|
|
path "${config.services.mpd.dataDir}/fifo"
|
|
format "44100:16:2"
|
|
}
|
|
'';
|
|
};
|
|
|
|
programs.ncmpcpp = {
|
|
enable = true;
|
|
package = pkgs.ncmpcpp.override { visualizerSupport = true; taglibSupport = false; };
|
|
mpdMusicDir = null; # does not work (not of type `null or path')
|
|
settings = {
|
|
# Visualizer
|
|
visualizer_fifo_path = "${config.services.mpd.dataDir}/fifo";
|
|
visualizer_in_stereo = "yes";
|
|
visualizer_look = "+|";
|
|
visualizer_output_name = "fifo";
|
|
visualizer_sync_interval = "15";
|
|
visualizer_type = "spectrum";
|
|
|
|
# Song list formatting
|
|
song_columns_list_format = builtins.concatStringsSep " " [
|
|
"(6f)[green]{NE}"
|
|
"(45)[white]{t|f:Title}"
|
|
"(20)[]{a}"
|
|
"(25)[cyan]{b}"
|
|
"(5f)[blue]{P}"
|
|
"(7f)[magenta]{l}"
|
|
];
|
|
|
|
# Display lists in column mode by default
|
|
browser_display_mode = "columns";
|
|
search_engine_display_mode = "columns";
|
|
|
|
# Faster seeking
|
|
seek_time = 5;
|
|
|
|
# More modern UI
|
|
user_interface = "alternative";
|
|
};
|
|
};
|
|
|
|
home.packages = with pkgs; [
|
|
mpc_cli
|
|
];
|
|
}
|