diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-07-03 11:11:53 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-07-03 11:11:53 +0530 |
| commit | 4dcde73af97061483a95b02c1480fc6917973aa6 (patch) | |
| tree | 0a497afd67027877e75bfed364be9db9e393e8bb /modules/music/mpd.home.nix | |
| parent | 7fe1a77a1c764eeb3d78153f89d434124189904f (diff) | |
| download | nixos-config-4dcde73af97061483a95b02c1480fc6917973aa6.tar.gz nixos-config-4dcde73af97061483a95b02c1480fc6917973aa6.zip | |
Switch back to mpd
Diffstat (limited to '')
| -rw-r--r-- | modules/music/mpd.home.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/modules/music/mpd.home.nix b/modules/music/mpd.home.nix new file mode 100644 index 0000000..3619786 --- /dev/null +++ b/modules/music/mpd.home.nix @@ -0,0 +1,55 @@ +{ ... }@moduleAttrs: +let + cfg = import ./config.nix moduleAttrs; +in +{ + services.mpd = { + enable = true; + musicDirectory = cfg.mpd.musicDir; + playlistDirectory = cfg.mpd.playlistDir; + network = { + listenAddress = cfg.mpd.host; + port = cfg.mpd.port; + }; + extraConfig = '' + user "imsohexy" + group "users" + restore_paused "yes" + metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" + auto_update "yes" + auto_update_depth "5" + follow_outside_symlinks "yes" + follow_inside_symlinks "yes" + + input { + plugin "curl" + } + + audio_output { + type "pipewire" + name "My PipeWire Device" + } + + audio_output { + type "fifo" + name "${cfg.mpd.visualizer_name}" + path "${cfg.mpd.visualizer_fifo}" + format "44100:16:2" + } + + filesystem_charset "UTF-8" + ''; + }; + + services.mpdris2 = { + # TODO: Hook to update dwmblock + enable = true; + notifications = false; + multimediaKeys = false; + mpd = { + host = cfg.mpd.host; + port = cfg.mpd.port; + musicDirectory = cfg.mpd.musicDir; + }; + }; +} |
