diff options
author | Preston Pan <ret2pop@gmail.com> | 2025-01-16 00:13:06 -0800 |
---|---|---|
committer | Preston Pan <ret2pop@gmail.com> | 2025-01-16 00:13:06 -0800 |
commit | 2dff9d2b61244fed49136028d0e0f6ae3ae759cf (patch) | |
tree | b94dabd4a159ed19705c109cd9047a724ddbd4e2 /nix/modules/home/mpd.nix | |
parent | dd461e48043dabee4694e2b200f4c1d9cfdbc3d9 (diff) |
modules about done
Diffstat (limited to 'nix/modules/home/mpd.nix')
-rw-r--r-- | nix/modules/home/mpd.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/nix/modules/home/mpd.nix b/nix/modules/home/mpd.nix new file mode 100644 index 0000000..eee23b3 --- /dev/null +++ b/nix/modules/home/mpd.nix @@ -0,0 +1,27 @@ +{ lib, config, ... }: +{ + enable = lib.mkDefault config.monorepo.profiles.home.music.enable; + dbFile = "/home/${config.vars.userName}/.config/mpd/db"; + dataDir = "/home/${config.vars.userName}/.config/mpd/"; + network.port = 6600; + musicDirectory = "/home/${config.vars.userName}/music"; + playlistDirectory = "/home/${config.vars.userName}/.config/mpd/playlists"; + network.listenAddress = "0.0.0.0"; + extraConfig = '' + audio_output { + type "pipewire" + name "pipewire output" + } + audio_output { + type "httpd" + name "My HTTP Stream" + encoder "opus" # optional + port "8000" + # quality "5.0" # do not define if bitrate is defined + bitrate "128000" # do not define if quality is defined + format "48000:16:1" + always_on "yes" # prevent MPD from disconnecting all listeners when playback is stopped. + tags "yes" # httpd supports sending tags to listening streams. + } + ''; +} |