Simon Bruder
bdd4956599
Some programs have difficulties with foot as TERM (e. g. aerc’s terminal). Therefore, it is manually set to xterm-256color and true colour support is forced in tmux.
80 lines
1.9 KiB
Nix
80 lines
1.9 KiB
Nix
{ config, lib, nixosConfig, pkgs, ... }:
|
|
|
|
# I only use mpd on gui systems. If I should ever need it on a headless system,
|
|
# I will add a separate option.
|
|
lib.mkIf nixosConfig.sbruder.gui.enable {
|
|
services.mpd = {
|
|
enable = true;
|
|
package = pkgs.mpd;
|
|
musicDirectory = "~/Music";
|
|
network.listenAddress = "${config.services.mpd.dataDir}/socket";
|
|
extraConfig = ''
|
|
zeroconf_enabled "no"
|
|
|
|
restore_paused "yes"
|
|
|
|
audio_output {
|
|
type "pipewire"
|
|
name "pipewire"
|
|
}
|
|
|
|
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 = {
|
|
# Connection
|
|
mpd_host = config.services.mpd.network.listenAddress;
|
|
|
|
# Visualizer
|
|
visualizer_autoscale = true;
|
|
visualizer_data_source = "${config.services.mpd.dataDir}/fifo";
|
|
visualizer_in_stereo = "yes";
|
|
visualizer_look = "●█";
|
|
visualizer_output_name = "fifo";
|
|
visualizer_spectrum_dft_size = 1;
|
|
|
|
# Song list formatting
|
|
song_columns_list_format = lib.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";
|
|
|
|
# Misc
|
|
external_editor = "nvim";
|
|
};
|
|
};
|
|
|
|
home.packages = with pkgs; [
|
|
mpc_cli
|
|
];
|
|
|
|
home.sessionVariables.MPD_HOST = config.services.mpd.network.listenAddress;
|
|
}
|