diff --git a/hosts/gabe-archlaptop.nix b/hosts/gabe-archlaptop.nix index 4b517cf..5b5637f 100644 --- a/hosts/gabe-archlaptop.nix +++ b/hosts/gabe-archlaptop.nix @@ -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 ]; } diff --git a/modules/home-manager/beets.nix b/modules/home-manager/beets.nix new file mode 100644 index 0000000..97b374b --- /dev/null +++ b/modules/home-manager/beets.nix @@ -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 + ]; +} diff --git a/modules/home-manager/mpd.nix b/modules/home-manager/mpd.nix index d9220f8..57139e8 100644 --- a/modules/home-manager/mpd.nix +++ b/modules/home-manager/mpd.nix @@ -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 + ]; } diff --git a/modules/home-manager/terminal/default.nix b/modules/home-manager/terminal/default.nix index da158af..e8a19dc 100644 --- a/modules/home-manager/terminal/default.nix +++ b/modules/home-manager/terminal/default.nix @@ -58,6 +58,7 @@ bat.enable = true; tealdeer.enable = true; btop.enable = true; + man.enable = true; direnv = { enable = true; nix-direnv.enable = true;