From bb555f56cbfa4be5547c18ab6b5d5e0335201a68 Mon Sep 17 00:00:00 2001 From: sajenim Date: Tue, 13 Feb 2024 22:56:37 +0800 Subject: [PATCH] client mpd + rpc install --- .../features/desktop/common/default.nix | 1 + .../sajenim/features/desktop/common/mpd.nix | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 home-manager/sajenim/features/desktop/common/mpd.nix diff --git a/home-manager/sajenim/features/desktop/common/default.nix b/home-manager/sajenim/features/desktop/common/default.nix index 7d59509..f0b5c4c 100644 --- a/home-manager/sajenim/features/desktop/common/default.nix +++ b/home-manager/sajenim/features/desktop/common/default.nix @@ -3,5 +3,6 @@ { imports = [ ./discord + ./mpd.nix ]; } diff --git a/home-manager/sajenim/features/desktop/common/mpd.nix b/home-manager/sajenim/features/desktop/common/mpd.nix new file mode 100644 index 0000000..3b266aa --- /dev/null +++ b/home-manager/sajenim/features/desktop/common/mpd.nix @@ -0,0 +1,30 @@ +{ pkgs, ... }: + +{ + services.mpd = { + enable = true; + musicDirectory = "nfs://192.168.1.102/srv/multimedia/library/music"; + dbFile = null; + extraConfig = '' + database { + plugin "proxy" + host "192.168.1.102" + port "6600" + } + + audio_output { + type "pulse" + name "PulseAudio" + server "127.0.0.1" # MPD must connect to the local sound server + } + ''; + }; + + services.mpd-discord-rpc = { + enable = true; + package = pkgs.unstable.mpd-discord-rpc; + settings = { + hosts = [ "192:6600" ]; + }; + }; +}