mpd: Listen on socket
This commit is contained in:
parent
bdc1c12f9c
commit
ba611b333b
|
@ -4,6 +4,7 @@
|
||||||
services.mpd = {
|
services.mpd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
musicDirectory = "~/Music";
|
musicDirectory = "~/Music";
|
||||||
|
network.listenAddress = "${config.services.mpd.dataDir}/socket";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
zeroconf_enabled "no"
|
zeroconf_enabled "no"
|
||||||
|
|
||||||
|
@ -29,6 +30,9 @@
|
||||||
package = pkgs.ncmpcpp.override { visualizerSupport = true; taglibSupport = false; };
|
package = pkgs.ncmpcpp.override { visualizerSupport = true; taglibSupport = false; };
|
||||||
mpdMusicDir = null; # does not work (not of type `null or path')
|
mpdMusicDir = null; # does not work (not of type `null or path')
|
||||||
settings = {
|
settings = {
|
||||||
|
# Connection
|
||||||
|
mpd_host = "${config.services.mpd.dataDir}/socket";
|
||||||
|
|
||||||
# Visualizer
|
# Visualizer
|
||||||
visualizer_fifo_path = "${config.services.mpd.dataDir}/fifo";
|
visualizer_fifo_path = "${config.services.mpd.dataDir}/fifo";
|
||||||
visualizer_in_stereo = "yes";
|
visualizer_in_stereo = "yes";
|
||||||
|
|
|
@ -332,6 +332,7 @@ lib.mkIf config.sbruder.gui.enable {
|
||||||
on-scroll-down = "brightnessctl set 5%-";
|
on-scroll-down = "brightnessctl set 5%-";
|
||||||
};
|
};
|
||||||
mpd = {
|
mpd = {
|
||||||
|
server = "${config.services.mpd.dataDir}/socket";
|
||||||
format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} – {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ";
|
format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} – {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ";
|
||||||
format-disconnected = "Disconnected ";
|
format-disconnected = "Disconnected ";
|
||||||
format-stopped = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ";
|
format-stopped = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ";
|
||||||
|
@ -339,8 +340,8 @@ lib.mkIf config.sbruder.gui.enable {
|
||||||
interval = 2;
|
interval = 2;
|
||||||
tooltip-format = "MPD (connected)";
|
tooltip-format = "MPD (connected)";
|
||||||
tooltip-format-disconnected = "MPD (disconnected)";
|
tooltip-format-disconnected = "MPD (disconnected)";
|
||||||
on-scroll-up = "${pkgs.mpc_cli}/bin/mpc volume +2";
|
on-scroll-up = "${pkgs.mpc_cli}/bin/mpc -h ${config.services.mpd.dataDir}/socket volume +2";
|
||||||
on-scroll-down = "${pkgs.mpc_cli}/bin/mpc volume -2";
|
on-scroll-down = "${pkgs.mpc_cli}/bin/mpc -h ${config.services.mpd.dataDir}/socket volume -2";
|
||||||
consume-icons = {
|
consume-icons = {
|
||||||
on = " ";
|
on = " ";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue