mpd and ncmpcpp

This commit is contained in:
Aria Nolan 2024-03-21 23:52:03 -04:00
parent a46628ace4
commit 0853afd06e
4 changed files with 33 additions and 0 deletions

View file

@ -54,6 +54,24 @@
enable = true; enable = true;
settings.PasswordAuthentication = false; settings.PasswordAuthentication = false;
}; };
services.mpd = {
enable = true;
user = "tacocat";
musicDirectory = "/data/music";
startWhenNeeded = true;
extraConfig = ''
audio_output {
type "pipewire"
name "Pipewire sound server"
}
'';
};
systemd.services.mpd.environment = {
# https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609
XDG_RUNTIME_DIR = "/run/user/1000";
# User-id must match above user. MPD will look inside this directory for
# the PipeWire socket.
};
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
services.udev.extraRules = '' services.udev.extraRules = ''
# 0d28:0204 DAPLink # 0d28:0204 DAPLink

View file

@ -24,6 +24,7 @@
]; ];
packages = with pkgs; [ packages = with pkgs; [
fd fd
mpc-cli
texliveFull texliveFull
ripgrep ripgrep
matlab matlab

View file

@ -10,6 +10,7 @@
./tiny.nix ./tiny.nix
./radioboat.nix ./radioboat.nix
./zoxide.nix ./zoxide.nix
./ncmpcpp.nix
]; ];
programs.eza = { programs.eza = {

View file

@ -0,0 +1,13 @@
{...}: {
programs.ncmpcpp = {
enable = true;
bindings = [
{ key = "j"; command = "scroll_down"; }
{ key = "k"; command = "scroll_up"; }
{ key = "J"; command = [ "select_item" "scroll_down" ]; }
{ key = "K"; command = [ "select_item" "scroll_up" ]; }
];
mpdMusicDir = "/data/music";
};
}