added mpd.

This commit is contained in:
Gabe Venberg 2024-04-06 16:27:57 -05:00
parent 96d0c67570
commit 48c6a2ceca
4 changed files with 99 additions and 0 deletions

View file

@ -28,5 +28,7 @@
../modules/home-manager/nvim
../modules/home-manager
../modules/home-manager/syncthing.nix
../modules/home-manager/beets.nix
../modules/home-manager/mpd.nix
];
}

View file

@ -0,0 +1,38 @@
{
config,
pkgs,
lib,
...
}: {
programs.beets = {
enable = true;
settings = {
directory = "~/Music";
library = "~/Music/library.db";
import = {
move = true;
write = true;
};
plugins = [
"edit"
"fetchart"
"chroma"
"thumbnails"
"replaygain"
"mbsync"
"fuzzy"
"duplicates"
"badfiles"
"fromfilename"
];
replaygain = {
auto = false;
backend = "ffmpeg";
};
asciify_paths = true;
};
};
home.packages = with pkgs; [
ffmpeg
];
}

View file

@ -4,4 +4,62 @@
lib,
...
}: {
services.mpd = {
enable = true;
musicDirectory = "${config.home.homeDirectory}/Music";
network.startWhenNeeded = true;
playlistDirectory = "${config.services.mpd.musicDirectory}/.mpd/playlists";
extraConfig = ''
restore_paused "yes"
auto_update "yes"
replaygain "auto"
follow_outside_symlinks "yes"
#for ncmpcpp visualizer
audio_output {
type "fifo"
name "Visualizer feed"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
audio_output {
type "pipewire"
name "PipeWire Sound Server"
}
'';
};
services.mpd-mpris.enable = true;
programs.ncmpcpp = {
enable = true;
package = pkgs.ncmpcpp.override {visualizerSupport = true;};
settings = {
visualizer_data_source = "/tmp/mpd.fifo";
visualizer_output_name = "Visualizer feed";
visualizer_in_stereo = "yes";
visualizer_type = "spectrum";
visualizer_fps = 60;
visualizer_autoscale = "no";
visualizer_look = "";
visualizer_color = "blue, cyan, green, yellow, magenta, red";
##
## Note: The next few visualization options apply to the spectrum visualizer.
##
visualizer_spectrum_smooth_look = "yes";
## A value between 1 and 5 inclusive. Specifying a larger value makes the
## visualizer look at a larger slice of time, which results in less jumpy
## visualizer output.
visualizer_spectrum_dft_size = 2;
visualizer_spectrum_gain = 10;
visualizer_spectrum_hz_min = 20;
visualizer_spectrum_hz_max = 20000;
};
};
home.packages = with pkgs; [
mpc-cli
];
}

View file

@ -58,6 +58,7 @@
bat.enable = true;
tealdeer.enable = true;
btop.enable = true;
man.enable = true;
direnv = {
enable = true;
nix-direnv.enable = true;