nix-config/modules/home-manager/mpd/default.nix

110 lines
3.0 KiB
Nix
Raw Permalink Normal View History

2022-01-18 09:32:55 +01:00
{ config, pkgs, ... }:
2023-07-23 17:07:50 +02:00
let
musicDir = "${config.home.homeDirectory}/Music";
master-host = "music.monotremata.xyz";
in
{
home.packages = with pkgs; [ mpc_cli mpdris2 playerctl ];
2023-07-23 17:07:50 +02:00
2022-01-18 09:32:55 +01:00
services.mpd = {
enable = true;
2022-03-15 08:20:40 +01:00
musicDirectory = "https://${master-host}";
2022-02-09 20:16:01 +01:00
dbFile = null;
2022-01-18 09:32:55 +01:00
network = {
listenAddress = "any";
port = 6600;
};
extraConfig = ''
audio_output {
type "pipewire"
name "pipewire audio"
}
audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
2022-02-09 20:16:01 +01:00
database {
plugin "proxy"
2022-03-15 08:20:40 +01:00
host "${master-host}"
2022-02-09 20:16:01 +01:00
port "6600"
}
2022-01-18 09:32:55 +01:00
'';
};
2023-07-23 17:07:50 +02:00
programs.ncmpcpp = {
enable = true;
mpdMusicDir = null;
bindings = [
{ key = "+"; command = "show_clock"; }
{ key = "="; command = "volume_up"; }
{ key = "j"; command = "scroll_down"; }
{ key = "k"; command = "scroll_up"; }
{ key = "h"; command = "previous_column"; }
{ key = "l"; command = "next_column"; }
{ key = "."; command = "show_lyrics"; }
{ key = "n"; command = "next_found_item"; }
{ key = "N"; command = "previous_found_item"; }
{ key = "J"; command = "move_sort_order_down"; }
{ key = "K"; command = "move_sort_order_up"; }
{ key = "ctrl-u"; command = "page_up"; }
{ key = "ctrl-d"; command = "page_down"; }
];
settings = {
autocenter_mode = "yes";
follow_now_playing_lyrics = "yes";
ignore_leading_the = "yes";
ignore_diacritics = "yes";
default_place_to_search_in = "database";
user_interface = "alternative";
alternative_header_first_line_format = "$0$aqqu$/a {$6%a$9 - }{$3%t$9}|{$3%f$9} $0$atqq$/a$9";
alternative_header_second_line_format = "{{$4%b$9}{ [$8%y$9]}}|{$4%D$9}";
song_status_format = " $6%a $7| $3%t $7| $4%b ";
colors_enabled = "yes";
main_window_color = "white";
header_window_color = "cyan";
volume_color = "green";
statusbar_color = "white";
progressbar_color = "cyan";
progressbar_elapsed_color = "white";
playlist_editor_display_mode = "columns";
search_engine_display_mode = "columns";
browser_display_mode = "columns";
playlist_display_mode = "columns";
song_columns_list_format = "(10)[blue]{l} (30)[green]{t} (30)[magenta]{a} (30)[yellow]{b}";
song_list_format = "{$7%a - $9}{$5%t$9}|{$5%f$9}$R{$6%b $9}{$3%l$9}";
progressbar_look = "";
current_item_prefix = "$(blue)$r";
current_item_suffix = "$/r$(end)";
current_item_inactive_column_prefix = "$(cyan)$r";
now_playing_prefix = " ";
centered_cursor = "yes";
selected_item_prefix = "* ";
discard_colors_if_item_is_selected = "yes";
display_bitrate = "yes";
enable_window_title = "yes";
empty_tag_marker = "";
};
};
services.mpdris2 = {
enable = true;
notifications = false;
mpd = {
host = "localhost";
musicDirectory = null;
};
};
2022-01-18 09:32:55 +01:00
}