about summary refs log tree commit diff
path: root/users/fcuny/desktop/media/mpd.nix
blob: a779158789c6541a887385516f7d4a0feb7b9ce4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ config, pkgs, ... }:

{
  home.packages = [
    pkgs.mpd
    pkgs.ncmpcpp
  ];

  xdg.configFile."ncmpcpp/config".source = ../../configs/ncmpcpp/config;

  services.mpd = {
    enable = true;
    musicDirectory = config.xdg.userDirs.music;
    network.startWhenNeeded = true;
    extraConfig = ''
      auto_update "yes"
      filesystem_charset "UTF-8"
      zeroconf_enabled "no"
      input {
        plugin "curl"
      }
      audio_output {
        type "pipewire"
        name "PipeWire Sound Server"
      }
      audio_output {
        type   "fifo"
        name   "visualizer"
        path   "/tmp/mpd.fifo"
        format "44100:16:2"
      }
    '';
  };
}